// $ANTLR 3.1.1 ANML.g 2010-06-01 19:37:47

package gov.nasa.anml.parsing;
import gov.nasa.anml.lifted.*;
import gov.nasa.anml.utility.*;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

import org.antlr.runtime.tree.*;

public class ANMLParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "Types", "Constants", "Fluents", "Actions", "Parameters", "Arguments", "Stmts", "Block", "Decompositions", "TypeRef", "LabelRef", "Ref", "Bind", "Access", "TypeRefine", "Type", "Fluent", "FluentFunction", "Constant", "ConstantFunction", "Parameter", "Action", "Label", "DefiniteInterval", "DefinitePoint", "IndefiniteInterval", "IndefinitePoint", "Bra", "Ket", "Before", "At", "After", "TBra", "TKet", "TStart", "TEnd", "TDuration", "Chain", "TimedStmt", "TimedExpr", "ContainsSomeStmt", "ContainsAllStmt", "ContainsSomeExpr", "ContainsAllExpr", "ForAllExpr", "ForAllStmt", "ExistsExpr", "ExistsStmt", "When", "WhenElse", "Enum", "Range", "ID", "This", "Boolean", "Integer", "Float", "Symbol", "String", "Object", "Vector", "Predicate", "LessThan", "Assign", "With", "Semi", "Comma", "Undefined", "Undefine", "LeftP", "RightP", "Variable", "Function", "Fact", "LeftC", "RightC", "NotLog", "NotBit", "EqualLog", "Equal", "Goal", "LeftB", "Duration", "RightB", "Decomposition", "Contains", "Else", "ForAll", "Exists", "Change", "Produce", "Consume", "Lend", "Use", "Within", "SetAssign", "Skip", "Delta", "All", "Dots", "Colon", "Implies", "XorLog", "OrLog", "AndLog", "XorBit", "Plus", "Minus", "OrBit", "Times", "Divide", "AndBit", "Unordered", "Ordered", "Dot", "Start", "End", "INT", "FLOAT", "STRING", "True", "False", "Infinity", "NotEqual", "GreaterThan", "LessThanE", "GreaterThanE", "DIGIT", "ESC", "LETTER", "WS", "SLC", "MLC"
    };
    public static final int IndefinitePoint=30;
    public static final int Implies=105;
    public static final int Ket=32;
    public static final int LessThan=66;
    public static final int OrBit=112;
    public static final int AndLog=108;
    public static final int TDuration=40;
    public static final int Stmts=10;
    public static final int LETTER=133;
    public static final int Before=33;
    public static final int Fluents=6;
    public static final int Constants=5;
    public static final int Bind=16;
    public static final int After=35;
    public static final int DefinitePoint=28;
    public static final int XorLog=106;
    public static final int Lend=96;
    public static final int LabelRef=14;
    public static final int Actions=7;
    public static final int EOF=-1;
    public static final int LessThanE=129;
    public static final int AndBit=115;
    public static final int Variable=75;
    public static final int NotLog=80;
    public static final int ForAll=91;
    public static final int When=52;
    public static final int TEnd=39;
    public static final int NotBit=81;
    public static final int Access=17;
    public static final int Undefined=71;
    public static final int Use=97;
    public static final int ContainsAllExpr=47;
    public static final int ExistsExpr=50;
    public static final int Decompositions=12;
    public static final int ForAllStmt=49;
    public static final int TimedStmt=42;
    public static final int ContainsSomeExpr=46;
    public static final int This=57;
    public static final int DefiniteInterval=27;
    public static final int INT=121;
    public static final int Colon=104;
    public static final int Action=25;
    public static final int NotEqual=127;
    public static final int TimedExpr=43;
    public static final int Equal=83;
    public static final int Fluent=20;
    public static final int With=68;
    public static final int Block=11;
    public static final int Object=63;
    public static final int Float=60;
    public static final int LeftC=78;
    public static final int Range=55;
    public static final int Minus=111;
    public static final int WS=134;
    public static final int Semi=69;
    public static final int LeftB=85;
    public static final int Function=76;
    public static final int Times=113;
    public static final int OrLog=107;
    public static final int MLC=136;
    public static final int TypeRefine=18;
    public static final int ExistsStmt=51;
    public static final int TBra=36;
    public static final int IndefiniteInterval=29;
    public static final int Else=90;
    public static final int Label=26;
    public static final int ForAllExpr=48;
    public static final int Types=4;
    public static final int End=120;
    public static final int Parameters=8;
    public static final int Fact=77;
    public static final int Unordered=116;
    public static final int Undefine=72;
    public static final int Within=98;
    public static final int LeftP=73;
    public static final int ESC=132;
    public static final int All=102;
    public static final int TStart=38;
    public static final int SLC=135;
    public static final int Decomposition=88;
    public static final int False=125;
    public static final int GreaterThanE=130;
    public static final int Constant=22;
    public static final int FLOAT=122;
    public static final int Enum=54;
    public static final int ID=56;
    public static final int GreaterThan=128;
    public static final int Consume=95;
    public static final int Arguments=9;
    public static final int Assign=67;
    public static final int Change=93;
    public static final int Chain=41;
    public static final int TypeRef=13;
    public static final int Produce=94;
    public static final int WhenElse=53;
    public static final int Ordered=117;
    public static final int ConstantFunction=23;
    public static final int Bra=31;
    public static final int Exists=92;
    public static final int DIGIT=131;
    public static final int Symbol=61;
    public static final int String=62;
    public static final int True=124;
    public static final int ContainsSomeStmt=44;
    public static final int Predicate=65;
    public static final int Vector=64;
    public static final int RightP=74;
    public static final int Start=119;
    public static final int At=34;
    public static final int Type=19;
    public static final int Delta=101;
    public static final int XorBit=109;
    public static final int Contains=89;
    public static final int TKet=37;
    public static final int ContainsAllStmt=45;
    public static final int RightC=79;
    public static final int SetAssign=99;
    public static final int RightB=87;
    public static final int Duration=86;
    public static final int Divide=114;
    public static final int Parameter=24;
    public static final int Goal=84;
    public static final int Skip=100;
    public static final int Ref=15;
    public static final int Plus=110;
    public static final int Boolean=58;
    public static final int Dot=118;
    public static final int Dots=103;
    public static final int EqualLog=82;
    public static final int Infinity=126;
    public static final int Comma=70;
    public static final int Integer=59;
    public static final int STRING=123;
    public static final int FluentFunction=21;

    // delegates
    // delegators

    protected static class T_scope {
        ANMLToken typeRef;
    }
    protected Stack T_stack = new Stack();
    protected static class S_scope {
        Scope d;
    }
    protected Stack S_stack = new Stack();


        public ANMLParser(TokenStream input) {
            this(input, new RecognizerSharedState());
        }
        public ANMLParser(TokenStream input, RecognizerSharedState state) {
            super(input, state);
             
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return ANMLParser.tokenNames; }
    public String getGrammarFileName() { return "ANML.g"; }


    	public int LA(int i) {
    		return input.LA(i);
    	}
    	public boolean LA(int i,int t) {
    		return input.LA(i)==t;
    	}
    	protected ANMLToken getMissingSymbol(IntStream input,
    									  RecognitionException e,
    									  int expectedTokenType,
    									  BitSet follow)
    	{
    		String tokenName = getTokenName(expectedTokenType);
    		String tokenText = "<missing " + tokenName + ">";
    		ANMLToken t = (ANMLToken)adaptor.create(expectedTokenType,tokenText);
    		Token current = ((TokenStream)input).LT(1);
    		if ( current.getType() == Token.EOF ) {
    			current = ((TokenStream)input).LT(-1);
    		}
    		t.line = current.getLine();
    		t.charPositionInLine = current.getCharPositionInLine();
    		t.channel = DEFAULT_TOKEN_CHANNEL;
    		return t;
    	}
    	public final String getTokenName(int tokenType) {
    		String tokenText = null;
    		if ( tokenType==Token.EOF ) tokenText = "EOF";
    		else tokenText = getTokenNames()[tokenType];
    		return tokenText;
    	}


    public static class model_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "model"
    // ANML.g:177:1: model[Domain d] : (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* -> ^( Block ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) ;
    public final ANMLParser.model_return model(Domain d) throws RecognitionException {
        S_stack.push(new S_scope());

        ANMLParser.model_return retval = new ANMLParser.model_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        List list_t=null;
        List list_c=null;
        List list_f=null;
        List list_a=null;
        List list_s=null;
        RuleReturnScope t = null;
        RuleReturnScope c = null;
        RuleReturnScope f = null;
        RuleReturnScope a = null;
        RuleReturnScope s = null;
        RewriteRuleSubtreeStream stream_fact_decl=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl");
        RewriteRuleSubtreeStream stream_goal_decl=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl");
        RewriteRuleSubtreeStream stream_type_decl=new RewriteRuleSubtreeStream(adaptor,"rule type_decl");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_fluent_decl=new RewriteRuleSubtreeStream(adaptor,"rule fluent_decl");
        RewriteRuleSubtreeStream stream_const_decl=new RewriteRuleSubtreeStream(adaptor,"rule const_decl");
        RewriteRuleSubtreeStream stream_action_decl=new RewriteRuleSubtreeStream(adaptor,"rule action_decl");
         ((S_scope)S_stack.peek()).d = d; 
        try {
            // ANML.g:180:1: ( (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* -> ^( Block ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) )
            // ANML.g:181:2: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            {
            // ANML.g:181:2: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            loop1:
            do {
                int alt1=8;
                alt1 = dfa1.predict(input);
                switch (alt1) {
            	case 1 :
            	    // ANML.g:181:4: t+= type_decl
            	    {
            	    pushFollow(FOLLOW_type_decl_in_model398);
            	    t=type_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_decl.add(t.getTree());
            	    if (list_t==null) list_t=new ArrayList();
            	    list_t.add(t.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:182:4: c+= const_decl
            	    {
            	    pushFollow(FOLLOW_const_decl_in_model406);
            	    c=const_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_const_decl.add(c.getTree());
            	    if (list_c==null) list_c=new ArrayList();
            	    list_c.add(c.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:183:4: f+= fluent_decl
            	    {
            	    pushFollow(FOLLOW_fluent_decl_in_model414);
            	    f=fluent_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fluent_decl.add(f.getTree());
            	    if (list_f==null) list_f=new ArrayList();
            	    list_f.add(f.getTree());


            	    }
            	    break;
            	case 4 :
            	    // ANML.g:184:4: a+= action_decl
            	    {
            	    pushFollow(FOLLOW_action_decl_in_model422);
            	    a=action_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_action_decl.add(a.getTree());
            	    if (list_a==null) list_a=new ArrayList();
            	    list_a.add(a.getTree());


            	    }
            	    break;
            	case 5 :
            	    // ANML.g:185:4: s+= fact_decl
            	    {
            	    pushFollow(FOLLOW_fact_decl_in_model429);
            	    s=fact_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fact_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 6 :
            	    // ANML.g:186:4: s+= goal_decl
            	    {
            	    pushFollow(FOLLOW_goal_decl_in_model437);
            	    s=goal_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_goal_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 7 :
            	    // ANML.g:187:4: s+= stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_model445);
            	    s=stmt();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_stmt.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);



            // AST REWRITE
            // elements: s, f, a, t, c
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: f, t, s, c, a
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",list_f);
            RewriteRuleSubtreeStream stream_t=new RewriteRuleSubtreeStream(adaptor,"token t",list_t);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"token c",list_c);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",list_a);
            root_0 = (ANMLToken)adaptor.nil();
            // 189:2: -> ^( Block ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
            {
                // ANML.g:190:2: ^( Block ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Block, "Block"), root_1);

                // ANML.g:191:3: ^( Types ( $t)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Types, "Types"), root_2);

                // ANML.g:191:11: ( $t)*
                while ( stream_t.hasNext() ) {
                    adaptor.addChild(root_2, stream_t.nextTree());

                }
                stream_t.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:192:3: ^( Constants ( $c)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constants, "Constants"), root_2);

                // ANML.g:192:15: ( $c)*
                while ( stream_c.hasNext() ) {
                    adaptor.addChild(root_2, stream_c.nextTree());

                }
                stream_c.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:193:3: ^( Fluents ( $f)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluents, "Fluents"), root_2);

                // ANML.g:193:13: ( $f)*
                while ( stream_f.hasNext() ) {
                    adaptor.addChild(root_2, stream_f.nextTree());

                }
                stream_f.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:194:3: ^( Actions ( $a)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Actions, "Actions"), root_2);

                // ANML.g:194:13: ( $a)*
                while ( stream_a.hasNext() ) {
                    adaptor.addChild(root_2, stream_a.nextTree());

                }
                stream_a.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:195:3: ^( Stmts ( $s)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Stmts, "Stmts"), root_2);

                // ANML.g:195:11: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_2, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            S_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "model"

    public static class builtinType_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "builtinType"
    // ANML.g:201:1: builtinType : ( Boolean | Integer | Float | Symbol | String | Object );
    public final ANMLParser.builtinType_return builtinType() throws RecognitionException {
        ANMLParser.builtinType_return retval = new ANMLParser.builtinType_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken set1=null;

        ANMLToken set1_tree=null;

        try {
            // ANML.g:202:2: ( Boolean | Integer | Float | Symbol | String | Object )
            // ANML.g:
            {
            root_0 = (ANMLToken)adaptor.nil();

            set1=(ANMLToken)input.LT(1);
            if ( (input.LA(1)>=Boolean && input.LA(1)<=Object) ) {
                input.consume();
                if ( state.backtracking==0 ) adaptor.addChild(root_0, (ANMLToken)adaptor.create(set1));
                state.errorRecovery=false;state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "builtinType"

    public static class type_spec_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_spec"
    // ANML.g:212:1: type_spec : ( builtinType ( set )? -> ^( TypeRef builtinType ( set )? ) | ID ( set )? -> ^( TypeRef ID ( set )? ) | Vector param_list -> ^( Vector param_list ) | type_enumeration );
    public final ANMLParser.type_spec_return type_spec() throws RecognitionException {
        ANMLParser.type_spec_return retval = new ANMLParser.type_spec_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID4=null;
        ANMLToken Vector6=null;
        ANMLParser.builtinType_return builtinType2 = null;

        ANMLParser.set_return set3 = null;

        ANMLParser.set_return set5 = null;

        ANMLParser.param_list_return param_list7 = null;

        ANMLParser.type_enumeration_return type_enumeration8 = null;


        ANMLToken ID4_tree=null;
        ANMLToken Vector6_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_Vector=new RewriteRuleTokenStream(adaptor,"token Vector");
        RewriteRuleSubtreeStream stream_set=new RewriteRuleSubtreeStream(adaptor,"rule set");
        RewriteRuleSubtreeStream stream_builtinType=new RewriteRuleSubtreeStream(adaptor,"rule builtinType");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:214:2: ( builtinType ( set )? -> ^( TypeRef builtinType ( set )? ) | ID ( set )? -> ^( TypeRef ID ( set )? ) | Vector param_list -> ^( Vector param_list ) | type_enumeration )
            int alt4=4;
            switch ( input.LA(1) ) {
            case Boolean:
            case Integer:
            case Float:
            case Symbol:
            case String:
            case Object:
                {
                alt4=1;
                }
                break;
            case ID:
                {
                alt4=2;
                }
                break;
            case Vector:
                {
                alt4=3;
                }
                break;
            case LeftC:
                {
                alt4=4;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;
            }

            switch (alt4) {
                case 1 :
                    // ANML.g:214:4: builtinType ( set )?
                    {
                    pushFollow(FOLLOW_builtinType_in_type_spec567);
                    builtinType2=builtinType();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_builtinType.add(builtinType2.getTree());
                    // ANML.g:214:16: ( set )?
                    int alt2=2;
                    int LA2_0 = input.LA(1);

                    if ( (LA2_0==LeftC||LA2_0==LeftB) ) {
                        alt2=1;
                    }
                    switch (alt2) {
                        case 1 :
                            // ANML.g:214:16: set
                            {
                            pushFollow(FOLLOW_set_in_type_spec569);
                            set3=set();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_set.add(set3.getTree());

                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: set, builtinType
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 215:4: -> ^( TypeRef builtinType ( set )? )
                    {
                        // ANML.g:215:7: ^( TypeRef builtinType ( set )? )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_builtinType.nextTree());
                        // ANML.g:215:29: ( set )?
                        if ( stream_set.hasNext() ) {
                            adaptor.addChild(root_1, stream_set.nextTree());

                        }
                        stream_set.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:216:4: ID ( set )?
                    {
                    ID4=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_spec589); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID4);

                    // ANML.g:216:7: ( set )?
                    int alt3=2;
                    int LA3_0 = input.LA(1);

                    if ( (LA3_0==LeftC||LA3_0==LeftB) ) {
                        alt3=1;
                    }
                    switch (alt3) {
                        case 1 :
                            // ANML.g:216:7: set
                            {
                            pushFollow(FOLLOW_set_in_type_spec591);
                            set5=set();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_set.add(set5.getTree());

                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: ID, set
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 217:4: -> ^( TypeRef ID ( set )? )
                    {
                        // ANML.g:217:7: ^( TypeRef ID ( set )? )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        // ANML.g:217:20: ( set )?
                        if ( stream_set.hasNext() ) {
                            adaptor.addChild(root_1, stream_set.nextTree());

                        }
                        stream_set.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:218:4: Vector param_list
                    {
                    Vector6=(ANMLToken)match(input,Vector,FOLLOW_Vector_in_type_spec611); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Vector.add(Vector6);

                    pushFollow(FOLLOW_param_list_in_type_spec613);
                    param_list7=param_list();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_param_list.add(param_list7.getTree());


                    // AST REWRITE
                    // elements: param_list, Vector
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 219:4: -> ^( Vector param_list )
                    {
                        // ANML.g:219:7: ^( Vector param_list )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot(stream_Vector.nextNode(), root_1);

                        adaptor.addChild(root_1, stream_param_list.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 4 :
                    // ANML.g:220:4: type_enumeration
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_type_enumeration_in_type_spec629);
                    type_enumeration8=type_enumeration();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, type_enumeration8.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
            if ( state.backtracking==0 ) {
              ((T_scope)T_stack.peek()).typeRef =((ANMLToken)retval.tree);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_spec"

    public static class type_ref_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_ref"
    // ANML.g:222:1: type_ref : ( builtinType ( set )? -> ^( TypeRef builtinType ( set )? ) | ID ( set )? -> ^( TypeRef ID ( set )? ) );
    public final ANMLParser.type_ref_return type_ref() throws RecognitionException {
        ANMLParser.type_ref_return retval = new ANMLParser.type_ref_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID11=null;
        ANMLParser.builtinType_return builtinType9 = null;

        ANMLParser.set_return set10 = null;

        ANMLParser.set_return set12 = null;


        ANMLToken ID11_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_set=new RewriteRuleSubtreeStream(adaptor,"rule set");
        RewriteRuleSubtreeStream stream_builtinType=new RewriteRuleSubtreeStream(adaptor,"rule builtinType");
        try {
            // ANML.g:224:2: ( builtinType ( set )? -> ^( TypeRef builtinType ( set )? ) | ID ( set )? -> ^( TypeRef ID ( set )? ) )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( ((LA7_0>=Boolean && LA7_0<=Object)) ) {
                alt7=1;
            }
            else if ( (LA7_0==ID) ) {
                alt7=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // ANML.g:224:4: builtinType ( set )?
                    {
                    pushFollow(FOLLOW_builtinType_in_type_ref644);
                    builtinType9=builtinType();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_builtinType.add(builtinType9.getTree());
                    // ANML.g:224:16: ( set )?
                    int alt5=2;
                    int LA5_0 = input.LA(1);

                    if ( (LA5_0==LeftC||LA5_0==LeftB) ) {
                        alt5=1;
                    }
                    switch (alt5) {
                        case 1 :
                            // ANML.g:224:16: set
                            {
                            pushFollow(FOLLOW_set_in_type_ref646);
                            set10=set();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_set.add(set10.getTree());

                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: set, builtinType
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 225:4: -> ^( TypeRef builtinType ( set )? )
                    {
                        // ANML.g:225:7: ^( TypeRef builtinType ( set )? )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_builtinType.nextTree());
                        // ANML.g:225:29: ( set )?
                        if ( stream_set.hasNext() ) {
                            adaptor.addChild(root_1, stream_set.nextTree());

                        }
                        stream_set.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:226:4: ID ( set )?
                    {
                    ID11=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_ref666); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID11);

                    // ANML.g:226:7: ( set )?
                    int alt6=2;
                    int LA6_0 = input.LA(1);

                    if ( (LA6_0==LeftC||LA6_0==LeftB) ) {
                        alt6=1;
                    }
                    switch (alt6) {
                        case 1 :
                            // ANML.g:226:7: set
                            {
                            pushFollow(FOLLOW_set_in_type_ref668);
                            set12=set();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_set.add(set12.getTree());

                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: set, ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 227:4: -> ^( TypeRef ID ( set )? )
                    {
                        // ANML.g:227:7: ^( TypeRef ID ( set )? )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        // ANML.g:227:20: ( set )?
                        if ( stream_set.hasNext() ) {
                            adaptor.addChild(root_1, stream_set.nextTree());

                        }
                        stream_set.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
            if ( state.backtracking==0 ) {
              ((T_scope)T_stack.peek()).typeRef =((ANMLToken)retval.tree);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_ref"

    public static class user_type_ref_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "user_type_ref"
    // ANML.g:229:1: user_type_ref : ID -> ^( TypeRef ID ) ;
    public final ANMLParser.user_type_ref_return user_type_ref() throws RecognitionException {
        ANMLParser.user_type_ref_return retval = new ANMLParser.user_type_ref_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID13=null;

        ANMLToken ID13_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");

        try {
            // ANML.g:231:2: ( ID -> ^( TypeRef ID ) )
            // ANML.g:231:4: ID
            {
            ID13=(ANMLToken)match(input,ID,FOLLOW_ID_in_user_type_ref698); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID13);



            // AST REWRITE
            // elements: ID
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 231:7: -> ^( TypeRef ID )
            {
                // ANML.g:231:10: ^( TypeRef ID )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
            if ( state.backtracking==0 ) {
              ((T_scope)T_stack.peek()).typeRef =((ANMLToken)retval.tree);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "user_type_ref"

    public static class enumerated_type_ref_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "enumerated_type_ref"
    // ANML.g:233:1: enumerated_type_ref : ( Symbol -> ^( TypeRef Symbol ) | Object -> ^( TypeRef Object ) | ID -> ^( TypeRef ID ) );
    public final ANMLParser.enumerated_type_ref_return enumerated_type_ref() throws RecognitionException {
        ANMLParser.enumerated_type_ref_return retval = new ANMLParser.enumerated_type_ref_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Symbol14=null;
        ANMLToken Object15=null;
        ANMLToken ID16=null;

        ANMLToken Symbol14_tree=null;
        ANMLToken Object15_tree=null;
        ANMLToken ID16_tree=null;
        RewriteRuleTokenStream stream_Symbol=new RewriteRuleTokenStream(adaptor,"token Symbol");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_Object=new RewriteRuleTokenStream(adaptor,"token Object");

        try {
            // ANML.g:235:2: ( Symbol -> ^( TypeRef Symbol ) | Object -> ^( TypeRef Object ) | ID -> ^( TypeRef ID ) )
            int alt8=3;
            switch ( input.LA(1) ) {
            case Symbol:
                {
                alt8=1;
                }
                break;
            case Object:
                {
                alt8=2;
                }
                break;
            case ID:
                {
                alt8=3;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 8, 0, input);

                throw nvae;
            }

            switch (alt8) {
                case 1 :
                    // ANML.g:235:4: Symbol
                    {
                    Symbol14=(ANMLToken)match(input,Symbol,FOLLOW_Symbol_in_enumerated_type_ref720); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Symbol.add(Symbol14);



                    // AST REWRITE
                    // elements: Symbol
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 235:11: -> ^( TypeRef Symbol )
                    {
                        // ANML.g:235:14: ^( TypeRef Symbol )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_Symbol.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:236:4: Object
                    {
                    Object15=(ANMLToken)match(input,Object,FOLLOW_Object_in_enumerated_type_ref733); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Object.add(Object15);



                    // AST REWRITE
                    // elements: Object
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 236:11: -> ^( TypeRef Object )
                    {
                        // ANML.g:236:14: ^( TypeRef Object )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_Object.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:237:4: ID
                    {
                    ID16=(ANMLToken)match(input,ID,FOLLOW_ID_in_enumerated_type_ref746); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID16);



                    // AST REWRITE
                    // elements: ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 237:7: -> ^( TypeRef ID )
                    {
                        // ANML.g:237:10: ^( TypeRef ID )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, "TypeRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
            if ( state.backtracking==0 ) {
              ((T_scope)T_stack.peek()).typeRef =((ANMLToken)retval.tree);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "enumerated_type_ref"

    public static class predicate_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "predicate_helper"
    // ANML.g:239:1: predicate_helper : Predicate -> ^( TypeRef[$Predicate] Boolean[$Predicate] ) ;
    public final ANMLParser.predicate_helper_return predicate_helper() throws RecognitionException {
        ANMLParser.predicate_helper_return retval = new ANMLParser.predicate_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Predicate17=null;

        ANMLToken Predicate17_tree=null;
        RewriteRuleTokenStream stream_Predicate=new RewriteRuleTokenStream(adaptor,"token Predicate");

        try {
            // ANML.g:241:2: ( Predicate -> ^( TypeRef[$Predicate] Boolean[$Predicate] ) )
            // ANML.g:241:4: Predicate
            {
            Predicate17=(ANMLToken)match(input,Predicate,FOLLOW_Predicate_in_predicate_helper768); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Predicate.add(Predicate17);



            // AST REWRITE
            // elements: 
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 242:4: -> ^( TypeRef[$Predicate] Boolean[$Predicate] )
            {
                // ANML.g:242:7: ^( TypeRef[$Predicate] Boolean[$Predicate] )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRef, Predicate17), root_1);

                adaptor.addChild(root_1, (ANMLToken)adaptor.create(Boolean, Predicate17));

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
            if ( state.backtracking==0 ) {
              ((T_scope)T_stack.peek()).typeRef =((ANMLToken)retval.tree);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "predicate_helper"

    public static class param_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "param_helper"
    // ANML.g:247:1: param_helper : ID -> ^( Parameter ID ) ;
    public final ANMLParser.param_helper_return param_helper() throws RecognitionException {
        ANMLParser.param_helper_return retval = new ANMLParser.param_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID18=null;

        ANMLToken ID18_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");

        try {
            // ANML.g:247:14: ( ID -> ^( Parameter ID ) )
            // ANML.g:247:16: ID
            {
            ID18=(ANMLToken)match(input,ID,FOLLOW_ID_in_param_helper792); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID18);



            // AST REWRITE
            // elements: ID
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 248:2: -> ^( Parameter ID )
            {
                // ANML.g:248:5: ^( Parameter ID )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Parameter, "Parameter"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, ((T_scope)T_stack.peek()).typeRef);

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "param_helper"

    public static class var_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "var_decl_helper"
    // ANML.g:250:1: var_decl_helper : ID ( init )? -> ^( Fluent ID ( init )? ) ;
    public final ANMLParser.var_decl_helper_return var_decl_helper() throws RecognitionException {
        ANMLParser.var_decl_helper_return retval = new ANMLParser.var_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID19=null;
        ANMLParser.init_return init20 = null;


        ANMLToken ID19_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_init=new RewriteRuleSubtreeStream(adaptor,"rule init");
        try {
            // ANML.g:250:17: ( ID ( init )? -> ^( Fluent ID ( init )? ) )
            // ANML.g:250:19: ID ( init )?
            {
            ID19=(ANMLToken)match(input,ID,FOLLOW_ID_in_var_decl_helper813); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID19);

            // ANML.g:250:22: ( init )?
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0==Assign||LA9_0==Undefine) ) {
                alt9=1;
            }
            switch (alt9) {
                case 1 :
                    // ANML.g:250:22: init
                    {
                    pushFollow(FOLLOW_init_in_var_decl_helper815);
                    init20=init();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_init.add(init20.getTree());

                    }
                    break;

            }



            // AST REWRITE
            // elements: ID, init
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 251:2: -> ^( Fluent ID ( init )? )
            {
                // ANML.g:251:5: ^( Fluent ID ( init )? )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluent, "Fluent"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, ((T_scope)T_stack.peek()).typeRef);
                // ANML.g:251:31: ( init )?
                if ( stream_init.hasNext() ) {
                    adaptor.addChild(root_1, stream_init.nextTree());

                }
                stream_init.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "var_decl_helper"

    public static class fun_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "fun_decl_helper"
    // ANML.g:253:1: fun_decl_helper : ID param_list -> ^( FluentFunction ID param_list ) ;
    public final ANMLParser.fun_decl_helper_return fun_decl_helper() throws RecognitionException {
        ANMLParser.fun_decl_helper_return retval = new ANMLParser.fun_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID21=null;
        ANMLParser.param_list_return param_list22 = null;


        ANMLToken ID21_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:253:17: ( ID param_list -> ^( FluentFunction ID param_list ) )
            // ANML.g:253:19: ID param_list
            {
            ID21=(ANMLToken)match(input,ID,FOLLOW_ID_in_fun_decl_helper839); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID21);

            pushFollow(FOLLOW_param_list_in_fun_decl_helper841);
            param_list22=param_list();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_list.add(param_list22.getTree());


            // AST REWRITE
            // elements: ID, param_list
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 254:2: -> ^( FluentFunction ID param_list )
            {
                // ANML.g:254:5: ^( FluentFunction ID param_list )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(FluentFunction, "FluentFunction"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, ((T_scope)T_stack.peek()).typeRef);
                adaptor.addChild(root_1, stream_param_list.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "fun_decl_helper"

    public static class const_var_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "const_var_decl_helper"
    // ANML.g:256:1: const_var_decl_helper : ID ( init )? -> ^( Constant ID ( init )? ) ;
    public final ANMLParser.const_var_decl_helper_return const_var_decl_helper() throws RecognitionException {
        ANMLParser.const_var_decl_helper_return retval = new ANMLParser.const_var_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID23=null;
        ANMLParser.init_return init24 = null;


        ANMLToken ID23_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_init=new RewriteRuleSubtreeStream(adaptor,"rule init");
        try {
            // ANML.g:256:23: ( ID ( init )? -> ^( Constant ID ( init )? ) )
            // ANML.g:256:25: ID ( init )?
            {
            ID23=(ANMLToken)match(input,ID,FOLLOW_ID_in_const_var_decl_helper863); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID23);

            // ANML.g:256:28: ( init )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==Assign||LA10_0==Undefine) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // ANML.g:256:28: init
                    {
                    pushFollow(FOLLOW_init_in_const_var_decl_helper865);
                    init24=init();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_init.add(init24.getTree());

                    }
                    break;

            }



            // AST REWRITE
            // elements: ID, init
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 257:2: -> ^( Constant ID ( init )? )
            {
                // ANML.g:257:5: ^( Constant ID ( init )? )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constant, "Constant"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, ((T_scope)T_stack.peek()).typeRef);
                // ANML.g:257:33: ( init )?
                if ( stream_init.hasNext() ) {
                    adaptor.addChild(root_1, stream_init.nextTree());

                }
                stream_init.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "const_var_decl_helper"

    public static class const_fun_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "const_fun_decl_helper"
    // ANML.g:259:1: const_fun_decl_helper : ID param_list -> ^( ConstantFunction ID param_list ) ;
    public final ANMLParser.const_fun_decl_helper_return const_fun_decl_helper() throws RecognitionException {
        ANMLParser.const_fun_decl_helper_return retval = new ANMLParser.const_fun_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID25=null;
        ANMLParser.param_list_return param_list26 = null;


        ANMLToken ID25_tree=null;
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:259:23: ( ID param_list -> ^( ConstantFunction ID param_list ) )
            // ANML.g:259:25: ID param_list
            {
            ID25=(ANMLToken)match(input,ID,FOLLOW_ID_in_const_fun_decl_helper889); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID25);

            pushFollow(FOLLOW_param_list_in_const_fun_decl_helper891);
            param_list26=param_list();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_list.add(param_list26.getTree());


            // AST REWRITE
            // elements: ID, param_list
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 260:2: -> ^( ConstantFunction ID param_list )
            {
                // ANML.g:260:5: ^( ConstantFunction ID param_list )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ConstantFunction, "ConstantFunction"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, ((T_scope)T_stack.peek()).typeRef);
                adaptor.addChild(root_1, stream_param_list.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "const_fun_decl_helper"

    public static class type_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_decl_helper"
    // ANML.g:262:1: type_decl_helper : ID ( LessThan s+= type_ref | Assign d+= type_spec | With p+= object_block )* -> ^( Type ID ^( Assign[\"Assign\"] ( $d)* ) ^( LessThan[\"LessThan\"] ( $s)* ) ^( With[\"With\"] ( $p)* ) ) ;
    public final ANMLParser.type_decl_helper_return type_decl_helper() throws RecognitionException {
        ANMLParser.type_decl_helper_return retval = new ANMLParser.type_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID27=null;
        ANMLToken LessThan28=null;
        ANMLToken Assign29=null;
        ANMLToken With30=null;
        List list_s=null;
        List list_d=null;
        List list_p=null;
        RuleReturnScope s = null;
        RuleReturnScope d = null;
        RuleReturnScope p = null;
        ANMLToken ID27_tree=null;
        ANMLToken LessThan28_tree=null;
        ANMLToken Assign29_tree=null;
        ANMLToken With30_tree=null;
        RewriteRuleTokenStream stream_Assign=new RewriteRuleTokenStream(adaptor,"token Assign");
        RewriteRuleTokenStream stream_LessThan=new RewriteRuleTokenStream(adaptor,"token LessThan");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_With=new RewriteRuleTokenStream(adaptor,"token With");
        RewriteRuleSubtreeStream stream_type_spec=new RewriteRuleSubtreeStream(adaptor,"rule type_spec");
        RewriteRuleSubtreeStream stream_object_block=new RewriteRuleSubtreeStream(adaptor,"rule object_block");
        RewriteRuleSubtreeStream stream_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule type_ref");
        try {
            // ANML.g:263:2: ( ID ( LessThan s+= type_ref | Assign d+= type_spec | With p+= object_block )* -> ^( Type ID ^( Assign[\"Assign\"] ( $d)* ) ^( LessThan[\"LessThan\"] ( $s)* ) ^( With[\"With\"] ( $p)* ) ) )
            // ANML.g:263:4: ID ( LessThan s+= type_ref | Assign d+= type_spec | With p+= object_block )*
            {
            ID27=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_decl_helper914); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID27);

            // ANML.g:264:4: ( LessThan s+= type_ref | Assign d+= type_spec | With p+= object_block )*
            loop11:
            do {
                int alt11=4;
                switch ( input.LA(1) ) {
                case LessThan:
                    {
                    alt11=1;
                    }
                    break;
                case Assign:
                    {
                    alt11=2;
                    }
                    break;
                case With:
                    {
                    alt11=3;
                    }
                    break;

                }

                switch (alt11) {
            	case 1 :
            	    // ANML.g:264:6: LessThan s+= type_ref
            	    {
            	    LessThan28=(ANMLToken)match(input,LessThan,FOLLOW_LessThan_in_type_decl_helper921); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_LessThan.add(LessThan28);

            	    pushFollow(FOLLOW_type_ref_in_type_decl_helper925);
            	    s=type_ref();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_ref.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:265:6: Assign d+= type_spec
            	    {
            	    Assign29=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_type_decl_helper932); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_Assign.add(Assign29);

            	    pushFollow(FOLLOW_type_spec_in_type_decl_helper936);
            	    d=type_spec();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_spec.add(d.getTree());
            	    if (list_d==null) list_d=new ArrayList();
            	    list_d.add(d.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:266:6: With p+= object_block
            	    {
            	    With30=(ANMLToken)match(input,With,FOLLOW_With_in_type_decl_helper943); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_With.add(With30);

            	    pushFollow(FOLLOW_object_block_in_type_decl_helper947);
            	    p=object_block();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_object_block.add(p.getTree());
            	    if (list_p==null) list_p=new ArrayList();
            	    list_p.add(p.getTree());


            	    }
            	    break;

            	default :
            	    break loop11;
                }
            } while (true);



            // AST REWRITE
            // elements: With, Assign, ID, p, LessThan, d, s
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: d, s, p
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",list_d);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_p=new RewriteRuleSubtreeStream(adaptor,"token p",list_p);
            root_0 = (ANMLToken)adaptor.nil();
            // 268:2: -> ^( Type ID ^( Assign[\"Assign\"] ( $d)* ) ^( LessThan[\"LessThan\"] ( $s)* ) ^( With[\"With\"] ( $p)* ) )
            {
                // ANML.g:268:5: ^( Type ID ^( Assign[\"Assign\"] ( $d)* ) ^( LessThan[\"LessThan\"] ( $s)* ) ^( With[\"With\"] ( $p)* ) )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Type, "Type"), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                // ANML.g:268:15: ^( Assign[\"Assign\"] ( $d)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, "Assign"), root_2);

                // ANML.g:268:34: ( $d)*
                while ( stream_d.hasNext() ) {
                    adaptor.addChild(root_2, stream_d.nextTree());

                }
                stream_d.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:268:39: ^( LessThan[\"LessThan\"] ( $s)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LessThan, "LessThan"), root_2);

                // ANML.g:268:62: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_2, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:268:67: ^( With[\"With\"] ( $p)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(With, "With"), root_2);

                // ANML.g:268:82: ( $p)*
                while ( stream_p.hasNext() ) {
                    adaptor.addChild(root_2, stream_p.nextTree());

                }
                stream_p.reset();

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_decl_helper"

    public static class type_refine_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_refine_helper"
    // ANML.g:270:1: type_refine_helper : ( user_type_ref LessThan type_ref Semi -> ^( TypeRefine[$LessThan] user_type_ref ^( LessThan type_ref ) ) | user_type_ref Assign type_spec Semi -> ^( TypeRefine[$Assign] user_type_ref ^( Assign type_spec ) ) | enumerated_type_ref i= ID ( Comma ID )* Semi -> ^( TypeRefine[$i] enumerated_type_ref ( ID )+ ) );
    public final ANMLParser.type_refine_helper_return type_refine_helper() throws RecognitionException {
        ANMLParser.type_refine_helper_return retval = new ANMLParser.type_refine_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken i=null;
        ANMLToken LessThan32=null;
        ANMLToken Semi34=null;
        ANMLToken Assign36=null;
        ANMLToken Semi38=null;
        ANMLToken Comma40=null;
        ANMLToken ID41=null;
        ANMLToken Semi42=null;
        ANMLParser.user_type_ref_return user_type_ref31 = null;

        ANMLParser.type_ref_return type_ref33 = null;

        ANMLParser.user_type_ref_return user_type_ref35 = null;

        ANMLParser.type_spec_return type_spec37 = null;

        ANMLParser.enumerated_type_ref_return enumerated_type_ref39 = null;


        ANMLToken i_tree=null;
        ANMLToken LessThan32_tree=null;
        ANMLToken Semi34_tree=null;
        ANMLToken Assign36_tree=null;
        ANMLToken Semi38_tree=null;
        ANMLToken Comma40_tree=null;
        ANMLToken ID41_tree=null;
        ANMLToken Semi42_tree=null;
        RewriteRuleTokenStream stream_Assign=new RewriteRuleTokenStream(adaptor,"token Assign");
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleTokenStream stream_LessThan=new RewriteRuleTokenStream(adaptor,"token LessThan");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_type_spec=new RewriteRuleSubtreeStream(adaptor,"rule type_spec");
        RewriteRuleSubtreeStream stream_user_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule user_type_ref");
        RewriteRuleSubtreeStream stream_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule type_ref");
        RewriteRuleSubtreeStream stream_enumerated_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule enumerated_type_ref");
        try {
            // ANML.g:271:2: ( user_type_ref LessThan type_ref Semi -> ^( TypeRefine[$LessThan] user_type_ref ^( LessThan type_ref ) ) | user_type_ref Assign type_spec Semi -> ^( TypeRefine[$Assign] user_type_ref ^( Assign type_spec ) ) | enumerated_type_ref i= ID ( Comma ID )* Semi -> ^( TypeRefine[$i] enumerated_type_ref ( ID )+ ) )
            int alt13=3;
            int LA13_0 = input.LA(1);

            if ( (LA13_0==ID) ) {
                switch ( input.LA(2) ) {
                case LessThan:
                    {
                    alt13=1;
                    }
                    break;
                case ID:
                    {
                    alt13=3;
                    }
                    break;
                case Assign:
                    {
                    alt13=2;
                    }
                    break;
                default:
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 13, 1, input);

                    throw nvae;
                }

            }
            else if ( (LA13_0==Symbol||LA13_0==Object) ) {
                alt13=3;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 13, 0, input);

                throw nvae;
            }
            switch (alt13) {
                case 1 :
                    // ANML.g:271:4: user_type_ref LessThan type_ref Semi
                    {
                    pushFollow(FOLLOW_user_type_ref_in_type_refine_helper998);
                    user_type_ref31=user_type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_user_type_ref.add(user_type_ref31.getTree());
                    LessThan32=(ANMLToken)match(input,LessThan,FOLLOW_LessThan_in_type_refine_helper1000); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LessThan.add(LessThan32);

                    pushFollow(FOLLOW_type_ref_in_type_refine_helper1002);
                    type_ref33=type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_ref.add(type_ref33.getTree());
                    Semi34=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_type_refine_helper1004); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi34);



                    // AST REWRITE
                    // elements: user_type_ref, type_ref, LessThan
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 272:3: -> ^( TypeRefine[$LessThan] user_type_ref ^( LessThan type_ref ) )
                    {
                        // ANML.g:272:6: ^( TypeRefine[$LessThan] user_type_ref ^( LessThan type_ref ) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRefine, LessThan32), root_1);

                        adaptor.addChild(root_1, stream_user_type_ref.nextTree());
                        // ANML.g:272:44: ^( LessThan type_ref )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot(stream_LessThan.nextNode(), root_2);

                        adaptor.addChild(root_2, stream_type_ref.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:273:4: user_type_ref Assign type_spec Semi
                    {
                    pushFollow(FOLLOW_user_type_ref_in_type_refine_helper1026);
                    user_type_ref35=user_type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_user_type_ref.add(user_type_ref35.getTree());
                    Assign36=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_type_refine_helper1028); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Assign.add(Assign36);

                    pushFollow(FOLLOW_type_spec_in_type_refine_helper1030);
                    type_spec37=type_spec();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_spec.add(type_spec37.getTree());
                    Semi38=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_type_refine_helper1032); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi38);



                    // AST REWRITE
                    // elements: type_spec, Assign, user_type_ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 274:3: -> ^( TypeRefine[$Assign] user_type_ref ^( Assign type_spec ) )
                    {
                        // ANML.g:274:6: ^( TypeRefine[$Assign] user_type_ref ^( Assign type_spec ) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRefine, Assign36), root_1);

                        adaptor.addChild(root_1, stream_user_type_ref.nextTree());
                        // ANML.g:274:42: ^( Assign type_spec )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot(stream_Assign.nextNode(), root_2);

                        adaptor.addChild(root_2, stream_type_spec.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:275:4: enumerated_type_ref i= ID ( Comma ID )* Semi
                    {
                    pushFollow(FOLLOW_enumerated_type_ref_in_type_refine_helper1054);
                    enumerated_type_ref39=enumerated_type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_enumerated_type_ref.add(enumerated_type_ref39.getTree());
                    i=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_refine_helper1058); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(i);

                    // ANML.g:275:29: ( Comma ID )*
                    loop12:
                    do {
                        int alt12=2;
                        int LA12_0 = input.LA(1);

                        if ( (LA12_0==Comma) ) {
                            alt12=1;
                        }


                        switch (alt12) {
                    	case 1 :
                    	    // ANML.g:275:30: Comma ID
                    	    {
                    	    Comma40=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_type_refine_helper1061); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma40);

                    	    ID41=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_refine_helper1063); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_ID.add(ID41);


                    	    }
                    	    break;

                    	default :
                    	    break loop12;
                        }
                    } while (true);

                    Semi42=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_type_refine_helper1067); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi42);



                    // AST REWRITE
                    // elements: ID, enumerated_type_ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 276:3: -> ^( TypeRefine[$i] enumerated_type_ref ( ID )+ )
                    {
                        // ANML.g:276:6: ^( TypeRefine[$i] enumerated_type_ref ( ID )+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TypeRefine, i), root_1);

                        adaptor.addChild(root_1, stream_enumerated_type_ref.nextTree());
                        if ( !(stream_ID.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_ID.hasNext() ) {
                            adaptor.addChild(root_1, stream_ID.nextNode());

                        }
                        stream_ID.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_refine_helper"

    public static class init_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "init"
    // ANML.g:280:1: init : ( Assign expr | Assign Undefined | Undefine );
    public final ANMLParser.init_return init() throws RecognitionException {
        ANMLParser.init_return retval = new ANMLParser.init_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Assign43=null;
        ANMLToken Assign45=null;
        ANMLToken Undefined46=null;
        ANMLToken Undefine47=null;
        ANMLParser.expr_return expr44 = null;


        ANMLToken Assign43_tree=null;
        ANMLToken Assign45_tree=null;
        ANMLToken Undefined46_tree=null;
        ANMLToken Undefine47_tree=null;

        try {
            // ANML.g:281:2: ( Assign expr | Assign Undefined | Undefine )
            int alt14=3;
            int LA14_0 = input.LA(1);

            if ( (LA14_0==Assign) ) {
                int LA14_1 = input.LA(2);

                if ( (LA14_1==Undefined) ) {
                    alt14=2;
                }
                else if ( ((LA14_1>=Bra && LA14_1<=Ket)||LA14_1==ID||LA14_1==LeftP||(LA14_1>=NotLog && LA14_1<=NotBit)||(LA14_1>=LeftB && LA14_1<=Duration)||LA14_1==Contains||(LA14_1>=ForAll && LA14_1<=Exists)||LA14_1==Dots||LA14_1==Minus||(LA14_1>=Unordered && LA14_1<=Ordered)||(LA14_1>=Start && LA14_1<=Infinity)) ) {
                    alt14=1;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 14, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA14_0==Undefine) ) {
                alt14=3;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 14, 0, input);

                throw nvae;
            }
            switch (alt14) {
                case 1 :
                    // ANML.g:281:4: Assign expr
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    Assign43=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_init1094); if (state.failed) return retval;
                    pushFollow(FOLLOW_expr_in_init1097);
                    expr44=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, expr44.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:282:4: Assign Undefined
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    Assign45=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_init1102); if (state.failed) return retval;
                    Undefined46=(ANMLToken)match(input,Undefined,FOLLOW_Undefined_in_init1105); if (state.failed) return retval;

                    }
                    break;
                case 3 :
                    // ANML.g:283:4: Undefine
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    Undefine47=(ANMLToken)match(input,Undefine,FOLLOW_Undefine_in_init1111); if (state.failed) return retval;

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "init"

    public static class param_list_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "param_list"
    // ANML.g:285:1: param_list : ( LeftP p+= param ( Comma p+= param )* RightP -> ^( Parameters ( $p)+ ) | LeftP RightP -> ^( Parameters ) ) ;
    public final ANMLParser.param_list_return param_list() throws RecognitionException {
        ANMLParser.param_list_return retval = new ANMLParser.param_list_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftP48=null;
        ANMLToken Comma49=null;
        ANMLToken RightP50=null;
        ANMLToken LeftP51=null;
        ANMLToken RightP52=null;
        List list_p=null;
        RuleReturnScope p = null;
        ANMLToken LeftP48_tree=null;
        ANMLToken Comma49_tree=null;
        ANMLToken RightP50_tree=null;
        ANMLToken LeftP51_tree=null;
        ANMLToken RightP52_tree=null;
        RewriteRuleTokenStream stream_RightP=new RewriteRuleTokenStream(adaptor,"token RightP");
        RewriteRuleTokenStream stream_LeftP=new RewriteRuleTokenStream(adaptor,"token LeftP");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_param=new RewriteRuleSubtreeStream(adaptor,"rule param");
        try {
            // ANML.g:285:12: ( ( LeftP p+= param ( Comma p+= param )* RightP -> ^( Parameters ( $p)+ ) | LeftP RightP -> ^( Parameters ) ) )
            // ANML.g:286:2: ( LeftP p+= param ( Comma p+= param )* RightP -> ^( Parameters ( $p)+ ) | LeftP RightP -> ^( Parameters ) )
            {
            // ANML.g:286:2: ( LeftP p+= param ( Comma p+= param )* RightP -> ^( Parameters ( $p)+ ) | LeftP RightP -> ^( Parameters ) )
            int alt16=2;
            int LA16_0 = input.LA(1);

            if ( (LA16_0==LeftP) ) {
                int LA16_1 = input.LA(2);

                if ( (LA16_1==RightP) ) {
                    alt16=2;
                }
                else if ( (LA16_1==ID||(LA16_1>=Boolean && LA16_1<=Object)) ) {
                    alt16=1;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 16, 1, input);

                    throw nvae;
                }
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 16, 0, input);

                throw nvae;
            }
            switch (alt16) {
                case 1 :
                    // ANML.g:286:4: LeftP p+= param ( Comma p+= param )* RightP
                    {
                    LeftP48=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_param_list1124); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP48);

                    pushFollow(FOLLOW_param_in_param_list1128);
                    p=param();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_param.add(p.getTree());
                    if (list_p==null) list_p=new ArrayList();
                    list_p.add(p.getTree());

                    // ANML.g:286:19: ( Comma p+= param )*
                    loop15:
                    do {
                        int alt15=2;
                        int LA15_0 = input.LA(1);

                        if ( (LA15_0==Comma) ) {
                            alt15=1;
                        }


                        switch (alt15) {
                    	case 1 :
                    	    // ANML.g:286:20: Comma p+= param
                    	    {
                    	    Comma49=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_param_list1131); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma49);

                    	    pushFollow(FOLLOW_param_in_param_list1135);
                    	    p=param();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_param.add(p.getTree());
                    	    if (list_p==null) list_p=new ArrayList();
                    	    list_p.add(p.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop15;
                        }
                    } while (true);

                    RightP50=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_param_list1139); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP50);



                    // AST REWRITE
                    // elements: p
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: p
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_p=new RewriteRuleSubtreeStream(adaptor,"token p",list_p);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 287:3: -> ^( Parameters ( $p)+ )
                    {
                        // ANML.g:287:6: ^( Parameters ( $p)+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Parameters, "Parameters"), root_1);

                        if ( !(stream_p.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_p.hasNext() ) {
                            adaptor.addChild(root_1, stream_p.nextTree());

                        }
                        stream_p.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:288:4: LeftP RightP
                    {
                    LeftP51=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_param_list1157); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP51);

                    RightP52=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_param_list1159); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP52);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 289:3: -> ^( Parameters )
                    {
                        // ANML.g:289:6: ^( Parameters )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Parameters, "Parameters"), root_1);

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "param_list"

    public static class param_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "param"
    // ANML.g:294:1: param : type_ref param_helper ( Comma param_helper )* -> ( param_helper )+ ;
    public final ANMLParser.param_return param() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.param_return retval = new ANMLParser.param_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Comma55=null;
        ANMLParser.type_ref_return type_ref53 = null;

        ANMLParser.param_helper_return param_helper54 = null;

        ANMLParser.param_helper_return param_helper56 = null;


        ANMLToken Comma55_tree=null;
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_param_helper=new RewriteRuleSubtreeStream(adaptor,"rule param_helper");
        RewriteRuleSubtreeStream stream_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule type_ref");
        try {
            // ANML.g:296:2: ( type_ref param_helper ( Comma param_helper )* -> ( param_helper )+ )
            // ANML.g:296:4: type_ref param_helper ( Comma param_helper )*
            {
            pushFollow(FOLLOW_type_ref_in_param1189);
            type_ref53=type_ref();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_type_ref.add(type_ref53.getTree());
            pushFollow(FOLLOW_param_helper_in_param1191);
            param_helper54=param_helper();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_helper.add(param_helper54.getTree());
            // ANML.g:296:26: ( Comma param_helper )*
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==Comma) ) {
                    int LA17_1 = input.LA(2);

                    if ( (LA17_1==ID) ) {
                        int LA17_3 = input.LA(3);

                        if ( (LA17_3==Comma||LA17_3==RightP) ) {
                            alt17=1;
                        }


                    }


                }


                switch (alt17) {
            	case 1 :
            	    // ANML.g:296:27: Comma param_helper
            	    {
            	    Comma55=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_param1194); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_Comma.add(Comma55);

            	    pushFollow(FOLLOW_param_helper_in_param1196);
            	    param_helper56=param_helper();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_param_helper.add(param_helper56.getTree());

            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);



            // AST REWRITE
            // elements: param_helper
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 297:4: -> ( param_helper )+
            {
                if ( !(stream_param_helper.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_param_helper.hasNext() ) {
                    adaptor.addChild(root_0, stream_param_helper.nextTree());

                }
                stream_param_helper.reset();

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "param"

    public static class type_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_decl"
    // ANML.g:299:1: type_decl : ( Type l+= type_decl_helper ( Comma l+= type_decl_helper )* Semi -> ( $l)+ | type_refine );
    public final ANMLParser.type_decl_return type_decl() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.type_decl_return retval = new ANMLParser.type_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Type57=null;
        ANMLToken Comma58=null;
        ANMLToken Semi59=null;
        List list_l=null;
        ANMLParser.type_refine_return type_refine60 = null;

        RuleReturnScope l = null;
        ANMLToken Type57_tree=null;
        ANMLToken Comma58_tree=null;
        ANMLToken Semi59_tree=null;
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleTokenStream stream_Type=new RewriteRuleTokenStream(adaptor,"token Type");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_type_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule type_decl_helper");
        try {
            // ANML.g:301:2: ( Type l+= type_decl_helper ( Comma l+= type_decl_helper )* Semi -> ( $l)+ | type_refine )
            int alt19=2;
            int LA19_0 = input.LA(1);

            if ( (LA19_0==Type) ) {
                alt19=1;
            }
            else if ( (LA19_0==Fact) ) {
                alt19=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 19, 0, input);

                throw nvae;
            }
            switch (alt19) {
                case 1 :
                    // ANML.g:301:4: Type l+= type_decl_helper ( Comma l+= type_decl_helper )* Semi
                    {
                    Type57=(ANMLToken)match(input,Type,FOLLOW_Type_in_type_decl1223); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Type.add(Type57);

                    pushFollow(FOLLOW_type_decl_helper_in_type_decl1227);
                    l=type_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:301:29: ( Comma l+= type_decl_helper )*
                    loop18:
                    do {
                        int alt18=2;
                        int LA18_0 = input.LA(1);

                        if ( (LA18_0==Comma) ) {
                            alt18=1;
                        }


                        switch (alt18) {
                    	case 1 :
                    	    // ANML.g:301:30: Comma l+= type_decl_helper
                    	    {
                    	    Comma58=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_type_decl1230); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma58);

                    	    pushFollow(FOLLOW_type_decl_helper_in_type_decl1234);
                    	    l=type_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_type_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop18;
                        }
                    } while (true);

                    Semi59=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_type_decl1238); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi59);



                    // AST REWRITE
                    // elements: l
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: l
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_l=new RewriteRuleSubtreeStream(adaptor,"token l",list_l);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 302:4: -> ( $l)+
                    {
                        if ( !(stream_l.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_l.hasNext() ) {
                            adaptor.addChild(root_0, stream_l.nextTree());

                        }
                        stream_l.reset();

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:303:4: type_refine
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_type_refine_in_type_decl1252);
                    type_refine60=type_refine();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, type_refine60.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "type_decl"

    public static class const_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "const_decl"
    // ANML.g:305:1: const_decl : Constant type_ref (l+= const_var_decl_helper ( Comma l+= const_var_decl_helper )* Semi | l+= const_fun_decl_helper ( Comma l+= const_fun_decl_helper )* Semi ) -> ( $l)+ ;
    public final ANMLParser.const_decl_return const_decl() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.const_decl_return retval = new ANMLParser.const_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Constant61=null;
        ANMLToken Comma63=null;
        ANMLToken Semi64=null;
        ANMLToken Comma65=null;
        ANMLToken Semi66=null;
        List list_l=null;
        ANMLParser.type_ref_return type_ref62 = null;

        RuleReturnScope l = null;
        ANMLToken Constant61_tree=null;
        ANMLToken Comma63_tree=null;
        ANMLToken Semi64_tree=null;
        ANMLToken Comma65_tree=null;
        ANMLToken Semi66_tree=null;
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleTokenStream stream_Constant=new RewriteRuleTokenStream(adaptor,"token Constant");
        RewriteRuleSubtreeStream stream_const_var_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule const_var_decl_helper");
        RewriteRuleSubtreeStream stream_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule type_ref");
        RewriteRuleSubtreeStream stream_const_fun_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule const_fun_decl_helper");
        try {
            // ANML.g:307:1: ( Constant type_ref (l+= const_var_decl_helper ( Comma l+= const_var_decl_helper )* Semi | l+= const_fun_decl_helper ( Comma l+= const_fun_decl_helper )* Semi ) -> ( $l)+ )
            // ANML.g:308:2: Constant type_ref (l+= const_var_decl_helper ( Comma l+= const_var_decl_helper )* Semi | l+= const_fun_decl_helper ( Comma l+= const_fun_decl_helper )* Semi )
            {
            Constant61=(ANMLToken)match(input,Constant,FOLLOW_Constant_in_const_decl1269); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Constant.add(Constant61);

            pushFollow(FOLLOW_type_ref_in_const_decl1271);
            type_ref62=type_ref();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_type_ref.add(type_ref62.getTree());
            // ANML.g:309:2: (l+= const_var_decl_helper ( Comma l+= const_var_decl_helper )* Semi | l+= const_fun_decl_helper ( Comma l+= const_fun_decl_helper )* Semi )
            int alt22=2;
            int LA22_0 = input.LA(1);

            if ( (LA22_0==ID) ) {
                int LA22_1 = input.LA(2);

                if ( (LA22_1==LeftP) ) {
                    alt22=2;
                }
                else if ( (LA22_1==Assign||(LA22_1>=Semi && LA22_1<=Comma)||LA22_1==Undefine) ) {
                    alt22=1;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 22, 1, input);

                    throw nvae;
                }
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 22, 0, input);

                throw nvae;
            }
            switch (alt22) {
                case 1 :
                    // ANML.g:309:4: l+= const_var_decl_helper ( Comma l+= const_var_decl_helper )* Semi
                    {
                    pushFollow(FOLLOW_const_var_decl_helper_in_const_decl1278);
                    l=const_var_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_const_var_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:309:29: ( Comma l+= const_var_decl_helper )*
                    loop20:
                    do {
                        int alt20=2;
                        int LA20_0 = input.LA(1);

                        if ( (LA20_0==Comma) ) {
                            alt20=1;
                        }


                        switch (alt20) {
                    	case 1 :
                    	    // ANML.g:309:30: Comma l+= const_var_decl_helper
                    	    {
                    	    Comma63=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_const_decl1281); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma63);

                    	    pushFollow(FOLLOW_const_var_decl_helper_in_const_decl1285);
                    	    l=const_var_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_const_var_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop20;
                        }
                    } while (true);

                    Semi64=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_const_decl1289); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi64);


                    }
                    break;
                case 2 :
                    // ANML.g:310:4: l+= const_fun_decl_helper ( Comma l+= const_fun_decl_helper )* Semi
                    {
                    pushFollow(FOLLOW_const_fun_decl_helper_in_const_decl1296);
                    l=const_fun_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_const_fun_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:310:29: ( Comma l+= const_fun_decl_helper )*
                    loop21:
                    do {
                        int alt21=2;
                        int LA21_0 = input.LA(1);

                        if ( (LA21_0==Comma) ) {
                            alt21=1;
                        }


                        switch (alt21) {
                    	case 1 :
                    	    // ANML.g:310:30: Comma l+= const_fun_decl_helper
                    	    {
                    	    Comma65=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_const_decl1299); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma65);

                    	    pushFollow(FOLLOW_const_fun_decl_helper_in_const_decl1303);
                    	    l=const_fun_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_const_fun_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop21;
                        }
                    } while (true);

                    Semi66=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_const_decl1307); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi66);


                    }
                    break;

            }



            // AST REWRITE
            // elements: l
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: l
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_l=new RewriteRuleSubtreeStream(adaptor,"token l",list_l);
            root_0 = (ANMLToken)adaptor.nil();
            // 312:4: -> ( $l)+
            {
                if ( !(stream_l.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_l.hasNext() ) {
                    adaptor.addChild(root_0, stream_l.nextTree());

                }
                stream_l.reset();

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "const_decl"

    public static class fluent_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "fluent_decl"
    // ANML.g:315:1: fluent_decl : ( Fluent type_ref (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) | Variable type_ref l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | Function type_ref l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi | predicate_helper l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) -> ( $l)+ ;
    public final ANMLParser.fluent_decl_return fluent_decl() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.fluent_decl_return retval = new ANMLParser.fluent_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Fluent67=null;
        ANMLToken Comma69=null;
        ANMLToken Semi70=null;
        ANMLToken Comma71=null;
        ANMLToken Semi72=null;
        ANMLToken Variable73=null;
        ANMLToken Comma75=null;
        ANMLToken Semi76=null;
        ANMLToken Function77=null;
        ANMLToken Comma79=null;
        ANMLToken Semi80=null;
        ANMLToken Comma82=null;
        ANMLToken Semi83=null;
        List list_l=null;
        ANMLParser.type_ref_return type_ref68 = null;

        ANMLParser.type_ref_return type_ref74 = null;

        ANMLParser.type_ref_return type_ref78 = null;

        ANMLParser.predicate_helper_return predicate_helper81 = null;

        RuleReturnScope l = null;
        ANMLToken Fluent67_tree=null;
        ANMLToken Comma69_tree=null;
        ANMLToken Semi70_tree=null;
        ANMLToken Comma71_tree=null;
        ANMLToken Semi72_tree=null;
        ANMLToken Variable73_tree=null;
        ANMLToken Comma75_tree=null;
        ANMLToken Semi76_tree=null;
        ANMLToken Function77_tree=null;
        ANMLToken Comma79_tree=null;
        ANMLToken Semi80_tree=null;
        ANMLToken Comma82_tree=null;
        ANMLToken Semi83_tree=null;
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleTokenStream stream_Variable=new RewriteRuleTokenStream(adaptor,"token Variable");
        RewriteRuleTokenStream stream_Function=new RewriteRuleTokenStream(adaptor,"token Function");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleTokenStream stream_Fluent=new RewriteRuleTokenStream(adaptor,"token Fluent");
        RewriteRuleSubtreeStream stream_predicate_helper=new RewriteRuleSubtreeStream(adaptor,"rule predicate_helper");
        RewriteRuleSubtreeStream stream_fun_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule fun_decl_helper");
        RewriteRuleSubtreeStream stream_type_ref=new RewriteRuleSubtreeStream(adaptor,"rule type_ref");
        RewriteRuleSubtreeStream stream_var_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule var_decl_helper");
        try {
            // ANML.g:317:1: ( ( Fluent type_ref (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) | Variable type_ref l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | Function type_ref l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi | predicate_helper l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) -> ( $l)+ )
            // ANML.g:318:2: ( Fluent type_ref (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) | Variable type_ref l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | Function type_ref l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi | predicate_helper l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi )
            {
            // ANML.g:318:2: ( Fluent type_ref (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi ) | Variable type_ref l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | Function type_ref l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi | predicate_helper l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi )
            int alt29=4;
            switch ( input.LA(1) ) {
            case Fluent:
                {
                alt29=1;
                }
                break;
            case Variable:
                {
                alt29=2;
                }
                break;
            case Function:
                {
                alt29=3;
                }
                break;
            case Predicate:
                {
                alt29=4;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 29, 0, input);

                throw nvae;
            }

            switch (alt29) {
                case 1 :
                    // ANML.g:318:4: Fluent type_ref (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi )
                    {
                    Fluent67=(ANMLToken)match(input,Fluent,FOLLOW_Fluent_in_fluent_decl1339); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Fluent.add(Fluent67);

                    pushFollow(FOLLOW_type_ref_in_fluent_decl1341);
                    type_ref68=type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_ref.add(type_ref68.getTree());
                    // ANML.g:319:5: (l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi | l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi )
                    int alt25=2;
                    int LA25_0 = input.LA(1);

                    if ( (LA25_0==ID) ) {
                        int LA25_1 = input.LA(2);

                        if ( (LA25_1==LeftP) ) {
                            alt25=2;
                        }
                        else if ( (LA25_1==Assign||(LA25_1>=Semi && LA25_1<=Comma)||LA25_1==Undefine) ) {
                            alt25=1;
                        }
                        else {
                            if (state.backtracking>0) {state.failed=true; return retval;}
                            NoViableAltException nvae =
                                new NoViableAltException("", 25, 1, input);

                            throw nvae;
                        }
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 25, 0, input);

                        throw nvae;
                    }
                    switch (alt25) {
                        case 1 :
                            // ANML.g:319:7: l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi
                            {
                            pushFollow(FOLLOW_var_decl_helper_in_fluent_decl1351);
                            l=var_decl_helper();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_var_decl_helper.add(l.getTree());
                            if (list_l==null) list_l=new ArrayList();
                            list_l.add(l.getTree());

                            // ANML.g:319:26: ( Comma l+= var_decl_helper )*
                            loop23:
                            do {
                                int alt23=2;
                                int LA23_0 = input.LA(1);

                                if ( (LA23_0==Comma) ) {
                                    alt23=1;
                                }


                                switch (alt23) {
                            	case 1 :
                            	    // ANML.g:319:27: Comma l+= var_decl_helper
                            	    {
                            	    Comma69=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_fluent_decl1354); if (state.failed) return retval; 
                            	    if ( state.backtracking==0 ) stream_Comma.add(Comma69);

                            	    pushFollow(FOLLOW_var_decl_helper_in_fluent_decl1358);
                            	    l=var_decl_helper();

                            	    state._fsp--;
                            	    if (state.failed) return retval;
                            	    if ( state.backtracking==0 ) stream_var_decl_helper.add(l.getTree());
                            	    if (list_l==null) list_l=new ArrayList();
                            	    list_l.add(l.getTree());


                            	    }
                            	    break;

                            	default :
                            	    break loop23;
                                }
                            } while (true);

                            Semi70=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fluent_decl1362); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Semi.add(Semi70);


                            }
                            break;
                        case 2 :
                            // ANML.g:320:7: l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi
                            {
                            pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1372);
                            l=fun_decl_helper();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                            if (list_l==null) list_l=new ArrayList();
                            list_l.add(l.getTree());

                            // ANML.g:320:26: ( Comma l+= fun_decl_helper )*
                            loop24:
                            do {
                                int alt24=2;
                                int LA24_0 = input.LA(1);

                                if ( (LA24_0==Comma) ) {
                                    alt24=1;
                                }


                                switch (alt24) {
                            	case 1 :
                            	    // ANML.g:320:27: Comma l+= fun_decl_helper
                            	    {
                            	    Comma71=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_fluent_decl1375); if (state.failed) return retval; 
                            	    if ( state.backtracking==0 ) stream_Comma.add(Comma71);

                            	    pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1379);
                            	    l=fun_decl_helper();

                            	    state._fsp--;
                            	    if (state.failed) return retval;
                            	    if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                            	    if (list_l==null) list_l=new ArrayList();
                            	    list_l.add(l.getTree());


                            	    }
                            	    break;

                            	default :
                            	    break loop24;
                                }
                            } while (true);

                            Semi72=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fluent_decl1383); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Semi.add(Semi72);


                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // ANML.g:322:4: Variable type_ref l+= var_decl_helper ( Comma l+= var_decl_helper )* Semi
                    {
                    Variable73=(ANMLToken)match(input,Variable,FOLLOW_Variable_in_fluent_decl1394); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Variable.add(Variable73);

                    pushFollow(FOLLOW_type_ref_in_fluent_decl1396);
                    type_ref74=type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_ref.add(type_ref74.getTree());
                    pushFollow(FOLLOW_var_decl_helper_in_fluent_decl1400);
                    l=var_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_var_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:322:41: ( Comma l+= var_decl_helper )*
                    loop26:
                    do {
                        int alt26=2;
                        int LA26_0 = input.LA(1);

                        if ( (LA26_0==Comma) ) {
                            alt26=1;
                        }


                        switch (alt26) {
                    	case 1 :
                    	    // ANML.g:322:42: Comma l+= var_decl_helper
                    	    {
                    	    Comma75=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_fluent_decl1403); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma75);

                    	    pushFollow(FOLLOW_var_decl_helper_in_fluent_decl1407);
                    	    l=var_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_var_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop26;
                        }
                    } while (true);

                    Semi76=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fluent_decl1411); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi76);


                    }
                    break;
                case 3 :
                    // ANML.g:323:4: Function type_ref l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi
                    {
                    Function77=(ANMLToken)match(input,Function,FOLLOW_Function_in_fluent_decl1417); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Function.add(Function77);

                    pushFollow(FOLLOW_type_ref_in_fluent_decl1419);
                    type_ref78=type_ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_ref.add(type_ref78.getTree());
                    pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1423);
                    l=fun_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:323:41: ( Comma l+= fun_decl_helper )*
                    loop27:
                    do {
                        int alt27=2;
                        int LA27_0 = input.LA(1);

                        if ( (LA27_0==Comma) ) {
                            alt27=1;
                        }


                        switch (alt27) {
                    	case 1 :
                    	    // ANML.g:323:42: Comma l+= fun_decl_helper
                    	    {
                    	    Comma79=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_fluent_decl1426); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma79);

                    	    pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1430);
                    	    l=fun_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop27;
                        }
                    } while (true);

                    Semi80=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fluent_decl1434); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi80);


                    }
                    break;
                case 4 :
                    // ANML.g:324:4: predicate_helper l+= fun_decl_helper ( Comma l+= fun_decl_helper )* Semi
                    {
                    pushFollow(FOLLOW_predicate_helper_in_fluent_decl1440);
                    predicate_helper81=predicate_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_predicate_helper.add(predicate_helper81.getTree());
                    pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1444);
                    l=fun_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                    if (list_l==null) list_l=new ArrayList();
                    list_l.add(l.getTree());

                    // ANML.g:324:40: ( Comma l+= fun_decl_helper )*
                    loop28:
                    do {
                        int alt28=2;
                        int LA28_0 = input.LA(1);

                        if ( (LA28_0==Comma) ) {
                            alt28=1;
                        }


                        switch (alt28) {
                    	case 1 :
                    	    // ANML.g:324:41: Comma l+= fun_decl_helper
                    	    {
                    	    Comma82=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_fluent_decl1447); if (state.failed) return retval; 
                    	    if ( state.backtracking==0 ) stream_Comma.add(Comma82);

                    	    pushFollow(FOLLOW_fun_decl_helper_in_fluent_decl1451);
                    	    l=fun_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_fun_decl_helper.add(l.getTree());
                    	    if (list_l==null) list_l=new ArrayList();
                    	    list_l.add(l.getTree());


                    	    }
                    	    break;

                    	default :
                    	    break loop28;
                        }
                    } while (true);

                    Semi83=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fluent_decl1455); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi83);


                    }
                    break;

            }



            // AST REWRITE
            // elements: l
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: l
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_l=new RewriteRuleSubtreeStream(adaptor,"token l",list_l);
            root_0 = (ANMLToken)adaptor.nil();
            // 326:4: -> ( $l)+
            {
                if ( !(stream_l.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_l.hasNext() ) {
                    adaptor.addChild(root_0, stream_l.nextTree());

                }
                stream_l.reset();

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "fluent_decl"

    public static class type_refine_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_refine"
    // ANML.g:329:1: type_refine : Fact ( LeftC ( type_refine_helper )+ RightC -> ( type_refine_helper )+ | type_refine_helper -> type_refine_helper ) ;
    public final ANMLParser.type_refine_return type_refine() throws RecognitionException {
        ANMLParser.type_refine_return retval = new ANMLParser.type_refine_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Fact84=null;
        ANMLToken LeftC85=null;
        ANMLToken RightC87=null;
        ANMLParser.type_refine_helper_return type_refine_helper86 = null;

        ANMLParser.type_refine_helper_return type_refine_helper88 = null;


        ANMLToken Fact84_tree=null;
        ANMLToken LeftC85_tree=null;
        ANMLToken RightC87_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_Fact=new RewriteRuleTokenStream(adaptor,"token Fact");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleSubtreeStream stream_type_refine_helper=new RewriteRuleSubtreeStream(adaptor,"rule type_refine_helper");
        try {
            // ANML.g:330:2: ( Fact ( LeftC ( type_refine_helper )+ RightC -> ( type_refine_helper )+ | type_refine_helper -> type_refine_helper ) )
            // ANML.g:330:4: Fact ( LeftC ( type_refine_helper )+ RightC -> ( type_refine_helper )+ | type_refine_helper -> type_refine_helper )
            {
            Fact84=(ANMLToken)match(input,Fact,FOLLOW_Fact_in_type_refine1478); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Fact.add(Fact84);

            // ANML.g:331:3: ( LeftC ( type_refine_helper )+ RightC -> ( type_refine_helper )+ | type_refine_helper -> type_refine_helper )
            int alt31=2;
            int LA31_0 = input.LA(1);

            if ( (LA31_0==LeftC) ) {
                alt31=1;
            }
            else if ( (LA31_0==ID||LA31_0==Symbol||LA31_0==Object) ) {
                alt31=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 31, 0, input);

                throw nvae;
            }
            switch (alt31) {
                case 1 :
                    // ANML.g:331:5: LeftC ( type_refine_helper )+ RightC
                    {
                    LeftC85=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_type_refine1484); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftC.add(LeftC85);

                    // ANML.g:331:11: ( type_refine_helper )+
                    int cnt30=0;
                    loop30:
                    do {
                        int alt30=2;
                        int LA30_0 = input.LA(1);

                        if ( (LA30_0==ID||LA30_0==Symbol||LA30_0==Object) ) {
                            alt30=1;
                        }


                        switch (alt30) {
                    	case 1 :
                    	    // ANML.g:331:11: type_refine_helper
                    	    {
                    	    pushFollow(FOLLOW_type_refine_helper_in_type_refine1486);
                    	    type_refine_helper86=type_refine_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_type_refine_helper.add(type_refine_helper86.getTree());

                    	    }
                    	    break;

                    	default :
                    	    if ( cnt30 >= 1 ) break loop30;
                    	    if (state.backtracking>0) {state.failed=true; return retval;}
                                EarlyExitException eee =
                                    new EarlyExitException(30, input);
                                throw eee;
                        }
                        cnt30++;
                    } while (true);

                    RightC87=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_type_refine1489); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightC.add(RightC87);



                    // AST REWRITE
                    // elements: type_refine_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 332:4: -> ( type_refine_helper )+
                    {
                        if ( !(stream_type_refine_helper.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_type_refine_helper.hasNext() ) {
                            adaptor.addChild(root_0, stream_type_refine_helper.nextTree());

                        }
                        stream_type_refine_helper.reset();

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:333:5: type_refine_helper
                    {
                    pushFollow(FOLLOW_type_refine_helper_in_type_refine1503);
                    type_refine_helper88=type_refine_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_type_refine_helper.add(type_refine_helper88.getTree());


                    // AST REWRITE
                    // elements: type_refine_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 334:4: -> type_refine_helper
                    {
                        adaptor.addChild(root_0, stream_type_refine_helper.nextTree());

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_refine"

    public static class fact_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "fact_decl_helper"
    // ANML.g:338:1: fact_decl_helper : ( ( ref Semi )=> ref Semi -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$Semi] ref True ) ) | ( ( NotLog | NotBit ) ref Semi )=> (n= NotLog | n= NotBit ) ref Semi -> ^( TimedStmt[$n] ^( DefinitePoint[$n] ^( TStart Start ) ) ^( Assign[$Semi] ref False ) ) | ref (o= EqualLog | o= Equal ) expr Semi -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$o] ref expr ) ) | Semi );
    public final ANMLParser.fact_decl_helper_return fact_decl_helper() throws RecognitionException {
        ANMLParser.fact_decl_helper_return retval = new ANMLParser.fact_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken n=null;
        ANMLToken o=null;
        ANMLToken Semi90=null;
        ANMLToken Semi92=null;
        ANMLToken Semi95=null;
        ANMLToken Semi96=null;
        ANMLParser.ref_return ref89 = null;

        ANMLParser.ref_return ref91 = null;

        ANMLParser.ref_return ref93 = null;

        ANMLParser.expr_return expr94 = null;


        ANMLToken n_tree=null;
        ANMLToken o_tree=null;
        ANMLToken Semi90_tree=null;
        ANMLToken Semi92_tree=null;
        ANMLToken Semi95_tree=null;
        ANMLToken Semi96_tree=null;
        RewriteRuleTokenStream stream_EqualLog=new RewriteRuleTokenStream(adaptor,"token EqualLog");
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleTokenStream stream_NotBit=new RewriteRuleTokenStream(adaptor,"token NotBit");
        RewriteRuleTokenStream stream_Equal=new RewriteRuleTokenStream(adaptor,"token Equal");
        RewriteRuleTokenStream stream_NotLog=new RewriteRuleTokenStream(adaptor,"token NotLog");
        RewriteRuleSubtreeStream stream_ref=new RewriteRuleSubtreeStream(adaptor,"rule ref");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        try {
            // ANML.g:339:2: ( ( ref Semi )=> ref Semi -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$Semi] ref True ) ) | ( ( NotLog | NotBit ) ref Semi )=> (n= NotLog | n= NotBit ) ref Semi -> ^( TimedStmt[$n] ^( DefinitePoint[$n] ^( TStart Start ) ) ^( Assign[$Semi] ref False ) ) | ref (o= EqualLog | o= Equal ) expr Semi -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$o] ref expr ) ) | Semi )
            int alt34=4;
            int LA34_0 = input.LA(1);

            if ( (LA34_0==ID) ) {
                int LA34_1 = input.LA(2);

                if ( (synpred1_ANML()) ) {
                    alt34=1;
                }
                else if ( (true) ) {
                    alt34=3;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 34, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA34_0==NotLog) && (synpred2_ANML())) {
                alt34=2;
            }
            else if ( (LA34_0==NotBit) && (synpred2_ANML())) {
                alt34=2;
            }
            else if ( (LA34_0==Semi) ) {
                alt34=4;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 34, 0, input);

                throw nvae;
            }
            switch (alt34) {
                case 1 :
                    // ANML.g:339:4: ( ref Semi )=> ref Semi
                    {
                    pushFollow(FOLLOW_ref_in_fact_decl_helper1534);
                    ref89=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref89.getTree());
                    Semi90=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fact_decl_helper1536); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi90);



                    // AST REWRITE
                    // elements: ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 340:4: -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$Semi] ref True ) )
                    {
                        // ANML.g:340:7: ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$Semi] ref True ) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedStmt, (ref89!=null?((ANMLToken)ref89.tree):null)), root_1);

                        // ANML.g:340:30: ^( DefinitePoint[$ref.tree] ^( TStart Start ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefinitePoint, (ref89!=null?((ANMLToken)ref89.tree):null)), root_2);

                        // ANML.g:340:57: ^( TStart Start )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:340:74: ^( Assign[$Semi] ref True )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, Semi90), root_2);

                        adaptor.addChild(root_2, stream_ref.nextTree());
                        adaptor.addChild(root_2, (ANMLToken)adaptor.create(True, "True"));

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:341:4: ( ( NotLog | NotBit ) ref Semi )=> (n= NotLog | n= NotBit ) ref Semi
                    {
                    // ANML.g:341:33: (n= NotLog | n= NotBit )
                    int alt32=2;
                    int LA32_0 = input.LA(1);

                    if ( (LA32_0==NotLog) ) {
                        alt32=1;
                    }
                    else if ( (LA32_0==NotBit) ) {
                        alt32=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 32, 0, input);

                        throw nvae;
                    }
                    switch (alt32) {
                        case 1 :
                            // ANML.g:341:34: n= NotLog
                            {
                            n=(ANMLToken)match(input,NotLog,FOLLOW_NotLog_in_fact_decl_helper1587); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_NotLog.add(n);


                            }
                            break;
                        case 2 :
                            // ANML.g:341:43: n= NotBit
                            {
                            n=(ANMLToken)match(input,NotBit,FOLLOW_NotBit_in_fact_decl_helper1591); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_NotBit.add(n);


                            }
                            break;

                    }

                    pushFollow(FOLLOW_ref_in_fact_decl_helper1594);
                    ref91=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref91.getTree());
                    Semi92=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fact_decl_helper1596); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi92);



                    // AST REWRITE
                    // elements: ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 342:4: -> ^( TimedStmt[$n] ^( DefinitePoint[$n] ^( TStart Start ) ) ^( Assign[$Semi] ref False ) )
                    {
                        // ANML.g:342:7: ^( TimedStmt[$n] ^( DefinitePoint[$n] ^( TStart Start ) ) ^( Assign[$Semi] ref False ) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedStmt, n), root_1);

                        // ANML.g:342:23: ^( DefinitePoint[$n] ^( TStart Start ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefinitePoint, n), root_2);

                        // ANML.g:342:43: ^( TStart Start )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:342:60: ^( Assign[$Semi] ref False )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, Semi92), root_2);

                        adaptor.addChild(root_2, stream_ref.nextTree());
                        adaptor.addChild(root_2, (ANMLToken)adaptor.create(False, "False"));

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:343:4: ref (o= EqualLog | o= Equal ) expr Semi
                    {
                    pushFollow(FOLLOW_ref_in_fact_decl_helper1631);
                    ref93=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref93.getTree());
                    // ANML.g:343:8: (o= EqualLog | o= Equal )
                    int alt33=2;
                    int LA33_0 = input.LA(1);

                    if ( (LA33_0==EqualLog) ) {
                        alt33=1;
                    }
                    else if ( (LA33_0==Equal) ) {
                        alt33=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 33, 0, input);

                        throw nvae;
                    }
                    switch (alt33) {
                        case 1 :
                            // ANML.g:343:9: o= EqualLog
                            {
                            o=(ANMLToken)match(input,EqualLog,FOLLOW_EqualLog_in_fact_decl_helper1636); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_EqualLog.add(o);


                            }
                            break;
                        case 2 :
                            // ANML.g:343:20: o= Equal
                            {
                            o=(ANMLToken)match(input,Equal,FOLLOW_Equal_in_fact_decl_helper1640); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Equal.add(o);


                            }
                            break;

                    }

                    pushFollow(FOLLOW_expr_in_fact_decl_helper1643);
                    expr94=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(expr94.getTree());
                    Semi95=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fact_decl_helper1645); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi95);



                    // AST REWRITE
                    // elements: ref, expr
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 344:4: -> ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$o] ref expr ) )
                    {
                        // ANML.g:344:7: ^( TimedStmt[$ref.tree] ^( DefinitePoint[$ref.tree] ^( TStart Start ) ) ^( Assign[$o] ref expr ) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedStmt, (ref93!=null?((ANMLToken)ref93.tree):null)), root_1);

                        // ANML.g:344:30: ^( DefinitePoint[$ref.tree] ^( TStart Start ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefinitePoint, (ref93!=null?((ANMLToken)ref93.tree):null)), root_2);

                        // ANML.g:344:57: ^( TStart Start )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:344:74: ^( Assign[$o] ref expr )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, o), root_2);

                        adaptor.addChild(root_2, stream_ref.nextTree());
                        adaptor.addChild(root_2, stream_expr.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 4 :
                    // ANML.g:345:4: Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    Semi96=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_fact_decl_helper1680); if (state.failed) return retval;

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "fact_decl_helper"

    public static class goal_decl_helper_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "goal_decl_helper"
    // ANML.g:348:1: goal_decl_helper : ( expr Semi -> ^( TimedStmt[$expr.tree] ^( DefinitePoint[$expr.tree] ^( TStart End ) ) expr ) | Semi );
    public final ANMLParser.goal_decl_helper_return goal_decl_helper() throws RecognitionException {
        ANMLParser.goal_decl_helper_return retval = new ANMLParser.goal_decl_helper_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Semi98=null;
        ANMLToken Semi99=null;
        ANMLParser.expr_return expr97 = null;


        ANMLToken Semi98_tree=null;
        ANMLToken Semi99_tree=null;
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        try {
            // ANML.g:349:2: ( expr Semi -> ^( TimedStmt[$expr.tree] ^( DefinitePoint[$expr.tree] ^( TStart End ) ) expr ) | Semi )
            int alt35=2;
            int LA35_0 = input.LA(1);

            if ( ((LA35_0>=Bra && LA35_0<=Ket)||LA35_0==ID||LA35_0==LeftP||(LA35_0>=NotLog && LA35_0<=NotBit)||(LA35_0>=LeftB && LA35_0<=Duration)||LA35_0==Contains||(LA35_0>=ForAll && LA35_0<=Exists)||LA35_0==Dots||LA35_0==Minus||(LA35_0>=Unordered && LA35_0<=Ordered)||(LA35_0>=Start && LA35_0<=Infinity)) ) {
                alt35=1;
            }
            else if ( (LA35_0==Semi) ) {
                alt35=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 35, 0, input);

                throw nvae;
            }
            switch (alt35) {
                case 1 :
                    // ANML.g:349:4: expr Semi
                    {
                    pushFollow(FOLLOW_expr_in_goal_decl_helper1691);
                    expr97=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(expr97.getTree());
                    Semi98=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_goal_decl_helper1693); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi98);



                    // AST REWRITE
                    // elements: expr
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 350:4: -> ^( TimedStmt[$expr.tree] ^( DefinitePoint[$expr.tree] ^( TStart End ) ) expr )
                    {
                        // ANML.g:350:7: ^( TimedStmt[$expr.tree] ^( DefinitePoint[$expr.tree] ^( TStart End ) ) expr )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedStmt, (expr97!=null?((ANMLToken)expr97.tree):null)), root_1);

                        // ANML.g:350:31: ^( DefinitePoint[$expr.tree] ^( TStart End ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefinitePoint, (expr97!=null?((ANMLToken)expr97.tree):null)), root_2);

                        // ANML.g:350:59: ^( TStart End )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(End, "End"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        adaptor.addChild(root_1, stream_expr.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:351:4: Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    Semi99=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_goal_decl_helper1721); if (state.failed) return retval;

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "goal_decl_helper"

    public static class fact_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "fact_decl"
    // ANML.g:354:1: fact_decl : Fact ( LeftC ( fact_decl_helper )* RightC -> ( fact_decl_helper )* | fact_decl_helper -> fact_decl_helper ) ;
    public final ANMLParser.fact_decl_return fact_decl() throws RecognitionException {
        ANMLParser.fact_decl_return retval = new ANMLParser.fact_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Fact100=null;
        ANMLToken LeftC101=null;
        ANMLToken RightC103=null;
        ANMLParser.fact_decl_helper_return fact_decl_helper102 = null;

        ANMLParser.fact_decl_helper_return fact_decl_helper104 = null;


        ANMLToken Fact100_tree=null;
        ANMLToken LeftC101_tree=null;
        ANMLToken RightC103_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_Fact=new RewriteRuleTokenStream(adaptor,"token Fact");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleSubtreeStream stream_fact_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl_helper");
        try {
            // ANML.g:354:11: ( Fact ( LeftC ( fact_decl_helper )* RightC -> ( fact_decl_helper )* | fact_decl_helper -> fact_decl_helper ) )
            // ANML.g:354:13: Fact ( LeftC ( fact_decl_helper )* RightC -> ( fact_decl_helper )* | fact_decl_helper -> fact_decl_helper )
            {
            Fact100=(ANMLToken)match(input,Fact,FOLLOW_Fact_in_fact_decl1732); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Fact.add(Fact100);

            // ANML.g:355:5: ( LeftC ( fact_decl_helper )* RightC -> ( fact_decl_helper )* | fact_decl_helper -> fact_decl_helper )
            int alt37=2;
            int LA37_0 = input.LA(1);

            if ( (LA37_0==LeftC) ) {
                alt37=1;
            }
            else if ( (LA37_0==ID||LA37_0==Semi||(LA37_0>=NotLog && LA37_0<=NotBit)) ) {
                alt37=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 37, 0, input);

                throw nvae;
            }
            switch (alt37) {
                case 1 :
                    // ANML.g:355:7: LeftC ( fact_decl_helper )* RightC
                    {
                    LeftC101=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_fact_decl1740); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftC.add(LeftC101);

                    // ANML.g:355:13: ( fact_decl_helper )*
                    loop36:
                    do {
                        int alt36=2;
                        int LA36_0 = input.LA(1);

                        if ( (LA36_0==ID||LA36_0==Semi||(LA36_0>=NotLog && LA36_0<=NotBit)) ) {
                            alt36=1;
                        }


                        switch (alt36) {
                    	case 1 :
                    	    // ANML.g:355:13: fact_decl_helper
                    	    {
                    	    pushFollow(FOLLOW_fact_decl_helper_in_fact_decl1742);
                    	    fact_decl_helper102=fact_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_fact_decl_helper.add(fact_decl_helper102.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop36;
                        }
                    } while (true);

                    RightC103=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_fact_decl1745); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightC.add(RightC103);



                    // AST REWRITE
                    // elements: fact_decl_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 356:7: -> ( fact_decl_helper )*
                    {
                        // ANML.g:356:10: ( fact_decl_helper )*
                        while ( stream_fact_decl_helper.hasNext() ) {
                            adaptor.addChild(root_0, stream_fact_decl_helper.nextTree());

                        }
                        stream_fact_decl_helper.reset();

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:357:7: fact_decl_helper
                    {
                    pushFollow(FOLLOW_fact_decl_helper_in_fact_decl1764);
                    fact_decl_helper104=fact_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_fact_decl_helper.add(fact_decl_helper104.getTree());


                    // AST REWRITE
                    // elements: fact_decl_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 358:7: -> fact_decl_helper
                    {
                        adaptor.addChild(root_0, stream_fact_decl_helper.nextTree());

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "fact_decl"

    public static class goal_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "goal_decl"
    // ANML.g:363:1: goal_decl : Goal ( LeftC ( goal_decl_helper )* RightC -> ( goal_decl_helper )* | goal_decl_helper -> goal_decl_helper ) ;
    public final ANMLParser.goal_decl_return goal_decl() throws RecognitionException {
        ANMLParser.goal_decl_return retval = new ANMLParser.goal_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Goal105=null;
        ANMLToken LeftC106=null;
        ANMLToken RightC108=null;
        ANMLParser.goal_decl_helper_return goal_decl_helper107 = null;

        ANMLParser.goal_decl_helper_return goal_decl_helper109 = null;


        ANMLToken Goal105_tree=null;
        ANMLToken LeftC106_tree=null;
        ANMLToken RightC108_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleTokenStream stream_Goal=new RewriteRuleTokenStream(adaptor,"token Goal");
        RewriteRuleSubtreeStream stream_goal_decl_helper=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl_helper");
        try {
            // ANML.g:363:11: ( Goal ( LeftC ( goal_decl_helper )* RightC -> ( goal_decl_helper )* | goal_decl_helper -> goal_decl_helper ) )
            // ANML.g:363:13: Goal ( LeftC ( goal_decl_helper )* RightC -> ( goal_decl_helper )* | goal_decl_helper -> goal_decl_helper )
            {
            Goal105=(ANMLToken)match(input,Goal,FOLLOW_Goal_in_goal_decl1791); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Goal.add(Goal105);

            // ANML.g:364:2: ( LeftC ( goal_decl_helper )* RightC -> ( goal_decl_helper )* | goal_decl_helper -> goal_decl_helper )
            int alt39=2;
            int LA39_0 = input.LA(1);

            if ( (LA39_0==LeftC) ) {
                alt39=1;
            }
            else if ( ((LA39_0>=Bra && LA39_0<=Ket)||LA39_0==ID||LA39_0==Semi||LA39_0==LeftP||(LA39_0>=NotLog && LA39_0<=NotBit)||(LA39_0>=LeftB && LA39_0<=Duration)||LA39_0==Contains||(LA39_0>=ForAll && LA39_0<=Exists)||LA39_0==Dots||LA39_0==Minus||(LA39_0>=Unordered && LA39_0<=Ordered)||(LA39_0>=Start && LA39_0<=Infinity)) ) {
                alt39=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 39, 0, input);

                throw nvae;
            }
            switch (alt39) {
                case 1 :
                    // ANML.g:364:4: LeftC ( goal_decl_helper )* RightC
                    {
                    LeftC106=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_goal_decl1797); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftC.add(LeftC106);

                    // ANML.g:364:10: ( goal_decl_helper )*
                    loop38:
                    do {
                        int alt38=2;
                        int LA38_0 = input.LA(1);

                        if ( ((LA38_0>=Bra && LA38_0<=Ket)||LA38_0==ID||LA38_0==Semi||LA38_0==LeftP||(LA38_0>=NotLog && LA38_0<=NotBit)||(LA38_0>=LeftB && LA38_0<=Duration)||LA38_0==Contains||(LA38_0>=ForAll && LA38_0<=Exists)||LA38_0==Dots||LA38_0==Minus||(LA38_0>=Unordered && LA38_0<=Ordered)||(LA38_0>=Start && LA38_0<=Infinity)) ) {
                            alt38=1;
                        }


                        switch (alt38) {
                    	case 1 :
                    	    // ANML.g:364:10: goal_decl_helper
                    	    {
                    	    pushFollow(FOLLOW_goal_decl_helper_in_goal_decl1799);
                    	    goal_decl_helper107=goal_decl_helper();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_goal_decl_helper.add(goal_decl_helper107.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop38;
                        }
                    } while (true);

                    RightC108=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_goal_decl1802); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightC.add(RightC108);



                    // AST REWRITE
                    // elements: goal_decl_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 365:4: -> ( goal_decl_helper )*
                    {
                        // ANML.g:365:7: ( goal_decl_helper )*
                        while ( stream_goal_decl_helper.hasNext() ) {
                            adaptor.addChild(root_0, stream_goal_decl_helper.nextTree());

                        }
                        stream_goal_decl_helper.reset();

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:366:4: goal_decl_helper
                    {
                    pushFollow(FOLLOW_goal_decl_helper_in_goal_decl1815);
                    goal_decl_helper109=goal_decl_helper();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_goal_decl_helper.add(goal_decl_helper109.getTree());


                    // AST REWRITE
                    // elements: goal_decl_helper
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 367:4: -> goal_decl_helper
                    {
                        adaptor.addChild(root_0, stream_goal_decl_helper.nextTree());

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "goal_decl"

    public static class object_block_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "object_block"
    // ANML.g:379:1: object_block : LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )+ RightC -> ^( Block[$LeftC,\"ObjectBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) ;
    public final ANMLParser.object_block_return object_block() throws RecognitionException {
        ANMLParser.object_block_return retval = new ANMLParser.object_block_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftC110=null;
        ANMLToken RightC111=null;
        List list_t=null;
        List list_c=null;
        List list_f=null;
        List list_a=null;
        List list_s=null;
        RuleReturnScope t = null;
        RuleReturnScope c = null;
        RuleReturnScope f = null;
        RuleReturnScope a = null;
        RuleReturnScope s = null;
        ANMLToken LeftC110_tree=null;
        ANMLToken RightC111_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleSubtreeStream stream_fact_decl=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl");
        RewriteRuleSubtreeStream stream_goal_decl=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl");
        RewriteRuleSubtreeStream stream_type_decl=new RewriteRuleSubtreeStream(adaptor,"rule type_decl");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_fluent_decl=new RewriteRuleSubtreeStream(adaptor,"rule fluent_decl");
        RewriteRuleSubtreeStream stream_const_decl=new RewriteRuleSubtreeStream(adaptor,"rule const_decl");
        RewriteRuleSubtreeStream stream_action_decl=new RewriteRuleSubtreeStream(adaptor,"rule action_decl");
        try {
            // ANML.g:379:14: ( LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )+ RightC -> ^( Block[$LeftC,\"ObjectBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) )
            // ANML.g:380:2: LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )+ RightC
            {
            LeftC110=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_object_block1846); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftC.add(LeftC110);

            // ANML.g:381:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )+
            int cnt40=0;
            loop40:
            do {
                int alt40=8;
                alt40 = dfa40.predict(input);
                switch (alt40) {
            	case 1 :
            	    // ANML.g:381:5: t+= type_decl
            	    {
            	    pushFollow(FOLLOW_type_decl_in_object_block1854);
            	    t=type_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_decl.add(t.getTree());
            	    if (list_t==null) list_t=new ArrayList();
            	    list_t.add(t.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:382:5: c+= const_decl
            	    {
            	    pushFollow(FOLLOW_const_decl_in_object_block1863);
            	    c=const_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_const_decl.add(c.getTree());
            	    if (list_c==null) list_c=new ArrayList();
            	    list_c.add(c.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:383:5: f+= fluent_decl
            	    {
            	    pushFollow(FOLLOW_fluent_decl_in_object_block1872);
            	    f=fluent_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fluent_decl.add(f.getTree());
            	    if (list_f==null) list_f=new ArrayList();
            	    list_f.add(f.getTree());


            	    }
            	    break;
            	case 4 :
            	    // ANML.g:384:5: a+= action_decl
            	    {
            	    pushFollow(FOLLOW_action_decl_in_object_block1881);
            	    a=action_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_action_decl.add(a.getTree());
            	    if (list_a==null) list_a=new ArrayList();
            	    list_a.add(a.getTree());


            	    }
            	    break;
            	case 5 :
            	    // ANML.g:385:5: s+= fact_decl
            	    {
            	    pushFollow(FOLLOW_fact_decl_in_object_block1889);
            	    s=fact_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fact_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 6 :
            	    // ANML.g:386:5: s+= goal_decl
            	    {
            	    pushFollow(FOLLOW_goal_decl_in_object_block1898);
            	    s=goal_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_goal_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 7 :
            	    // ANML.g:387:5: s+= stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_object_block1907);
            	    s=stmt();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_stmt.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;

            	default :
            	    if ( cnt40 >= 1 ) break loop40;
            	    if (state.backtracking>0) {state.failed=true; return retval;}
                        EarlyExitException eee =
                            new EarlyExitException(40, input);
                        throw eee;
                }
                cnt40++;
            } while (true);

            RightC111=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_object_block1917); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightC.add(RightC111);



            // AST REWRITE
            // elements: f, t, a, s, c
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: f, t, s, c, a
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",list_f);
            RewriteRuleSubtreeStream stream_t=new RewriteRuleSubtreeStream(adaptor,"token t",list_t);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"token c",list_c);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",list_a);
            root_0 = (ANMLToken)adaptor.nil();
            // 390:3: -> ^( Block[$LeftC,\"ObjectBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
            {
                // ANML.g:391:3: ^( Block[$LeftC,\"ObjectBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Block, LeftC110, "ObjectBlock"), root_1);

                // ANML.g:392:4: ^( Types ( $t)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Types, "Types"), root_2);

                // ANML.g:392:12: ( $t)*
                while ( stream_t.hasNext() ) {
                    adaptor.addChild(root_2, stream_t.nextTree());

                }
                stream_t.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:393:4: ^( Constants ( $c)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constants, "Constants"), root_2);

                // ANML.g:393:16: ( $c)*
                while ( stream_c.hasNext() ) {
                    adaptor.addChild(root_2, stream_c.nextTree());

                }
                stream_c.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:394:4: ^( Fluents ( $f)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluents, "Fluents"), root_2);

                // ANML.g:394:14: ( $f)*
                while ( stream_f.hasNext() ) {
                    adaptor.addChild(root_2, stream_f.nextTree());

                }
                stream_f.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:395:4: ^( Actions ( $a)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Actions, "Actions"), root_2);

                // ANML.g:395:14: ( $a)*
                while ( stream_a.hasNext() ) {
                    adaptor.addChild(root_2, stream_a.nextTree());

                }
                stream_a.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:396:4: ^( Stmts ( $s)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Stmts, "Stmts"), root_2);

                // ANML.g:396:12: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_2, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "object_block"

    public static class action_decl_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "action_decl"
    // ANML.g:414:1: action_decl : Action ID param_list ( LeftB Duration RightB )? action_block[a] -> ^( Action ID param_list ( Duration )? action_block ) ;
    public final ANMLParser.action_decl_return action_decl() throws RecognitionException {
        ANMLParser.action_decl_return retval = new ANMLParser.action_decl_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Action112=null;
        ANMLToken ID113=null;
        ANMLToken LeftB115=null;
        ANMLToken Duration116=null;
        ANMLToken RightB117=null;
        ANMLParser.param_list_return param_list114 = null;

        ANMLParser.action_block_return action_block118 = null;


        ANMLToken Action112_tree=null;
        ANMLToken ID113_tree=null;
        ANMLToken LeftB115_tree=null;
        ANMLToken Duration116_tree=null;
        ANMLToken RightB117_tree=null;
        RewriteRuleTokenStream stream_RightB=new RewriteRuleTokenStream(adaptor,"token RightB");
        RewriteRuleTokenStream stream_Action=new RewriteRuleTokenStream(adaptor,"token Action");
        RewriteRuleTokenStream stream_LeftB=new RewriteRuleTokenStream(adaptor,"token LeftB");
        RewriteRuleTokenStream stream_Duration=new RewriteRuleTokenStream(adaptor,"token Duration");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_action_block=new RewriteRuleSubtreeStream(adaptor,"rule action_block");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
         Action a=null; 
        try {
            // ANML.g:416:1: ( Action ID param_list ( LeftB Duration RightB )? action_block[a] -> ^( Action ID param_list ( Duration )? action_block ) )
            // ANML.g:417:2: Action ID param_list ( LeftB Duration RightB )? action_block[a]
            {
            Action112=(ANMLToken)match(input,Action,FOLLOW_Action_in_action_decl2022); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Action.add(Action112);

            ID113=(ANMLToken)match(input,ID,FOLLOW_ID_in_action_decl2024); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(ID113);

            if ( state.backtracking==0 ) {

              			a = new Action(((S_scope)S_stack.peek()).d,ID113.getSimpleText());
              			((S_scope)S_stack.peek()).d.addAction(a);
              		
            }
            pushFollow(FOLLOW_param_list_in_action_decl2030);
            param_list114=param_list();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_list.add(param_list114.getTree());
            // ANML.g:422:2: ( LeftB Duration RightB )?
            int alt41=2;
            int LA41_0 = input.LA(1);

            if ( (LA41_0==LeftB) ) {
                alt41=1;
            }
            switch (alt41) {
                case 1 :
                    // ANML.g:422:3: LeftB Duration RightB
                    {
                    LeftB115=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_action_decl2034); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftB.add(LeftB115);

                    Duration116=(ANMLToken)match(input,Duration,FOLLOW_Duration_in_action_decl2036); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Duration.add(Duration116);

                    RightB117=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_action_decl2038); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightB.add(RightB117);


                    }
                    break;

            }

            pushFollow(FOLLOW_action_block_in_action_decl2044);
            action_block118=action_block(a);

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_action_block.add(action_block118.getTree());


            // AST REWRITE
            // elements: ID, action_block, Action, param_list, Duration
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 424:2: -> ^( Action ID param_list ( Duration )? action_block )
            {
                // ANML.g:424:5: ^( Action ID param_list ( Duration )? action_block )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot(stream_Action.nextNode(), root_1);

                adaptor.addChild(root_1, stream_ID.nextNode());
                adaptor.addChild(root_1, stream_param_list.nextTree());
                // ANML.g:424:28: ( Duration )?
                if ( stream_Duration.hasNext() ) {
                    adaptor.addChild(root_1, stream_Duration.nextNode());

                }
                stream_Duration.reset();
                adaptor.addChild(root_1, stream_action_block.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "action_decl"

    public static class durative_action_block_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "durative_action_block"
    // ANML.g:440:1: durative_action_block[Action a] : LeftB Duration RightB action_block_h ;
    public final ANMLParser.durative_action_block_return durative_action_block(Action a) throws RecognitionException {
        S_stack.push(new S_scope());

        ANMLParser.durative_action_block_return retval = new ANMLParser.durative_action_block_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftB119=null;
        ANMLToken Duration120=null;
        ANMLToken RightB121=null;
        ANMLParser.action_block_h_return action_block_h122 = null;


        ANMLToken LeftB119_tree=null;
        ANMLToken Duration120_tree=null;
        ANMLToken RightB121_tree=null;

        ((S_scope)S_stack.peek()).d =a;
        try {
            // ANML.g:443:1: ( LeftB Duration RightB action_block_h )
            // ANML.g:444:3: LeftB Duration RightB action_block_h
            {
            root_0 = (ANMLToken)adaptor.nil();

            LeftB119=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_durative_action_block2099); if (state.failed) return retval;
            Duration120=(ANMLToken)match(input,Duration,FOLLOW_Duration_in_durative_action_block2102); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            Duration120_tree = (ANMLToken)adaptor.create(Duration120);
            adaptor.addChild(root_0, Duration120_tree);
            }
            RightB121=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_durative_action_block2104); if (state.failed) return retval;
            pushFollow(FOLLOW_action_block_h_in_durative_action_block2107);
            action_block_h122=action_block_h();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, action_block_h122.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            S_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "durative_action_block"

    public static class action_block_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "action_block"
    // ANML.g:447:1: action_block[Action a] : action_block_h ;
    public final ANMLParser.action_block_return action_block(Action a) throws RecognitionException {
        S_stack.push(new S_scope());

        ANMLParser.action_block_return retval = new ANMLParser.action_block_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.action_block_h_return action_block_h123 = null;



        ((S_scope)S_stack.peek()).d =a;
        try {
            // ANML.g:450:1: ( action_block_h )
            // ANML.g:451:3: action_block_h
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_action_block_h_in_action_block2130);
            action_block_h123=action_block_h();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, action_block_h123.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            S_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "action_block"

    public static class action_block_h_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "action_block_h"
    // ANML.g:454:1: action_block_h : LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* (d+= decomp_block )* RightC -> ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ^( Decompositions ( $d)* ) ;
    public final ANMLParser.action_block_h_return action_block_h() throws RecognitionException {
        ANMLParser.action_block_h_return retval = new ANMLParser.action_block_h_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftC124=null;
        ANMLToken RightC125=null;
        List list_t=null;
        List list_c=null;
        List list_f=null;
        List list_a=null;
        List list_s=null;
        List list_d=null;
        RuleReturnScope t = null;
        RuleReturnScope c = null;
        RuleReturnScope f = null;
        RuleReturnScope a = null;
        RuleReturnScope s = null;
        RuleReturnScope d = null;
        ANMLToken LeftC124_tree=null;
        ANMLToken RightC125_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleSubtreeStream stream_fact_decl=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl");
        RewriteRuleSubtreeStream stream_decomp_block=new RewriteRuleSubtreeStream(adaptor,"rule decomp_block");
        RewriteRuleSubtreeStream stream_goal_decl=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl");
        RewriteRuleSubtreeStream stream_type_decl=new RewriteRuleSubtreeStream(adaptor,"rule type_decl");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_fluent_decl=new RewriteRuleSubtreeStream(adaptor,"rule fluent_decl");
        RewriteRuleSubtreeStream stream_const_decl=new RewriteRuleSubtreeStream(adaptor,"rule const_decl");
        RewriteRuleSubtreeStream stream_action_decl=new RewriteRuleSubtreeStream(adaptor,"rule action_decl");
        try {
            // ANML.g:455:3: ( LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* (d+= decomp_block )* RightC -> ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ^( Decompositions ( $d)* ) )
            // ANML.g:455:5: LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* (d+= decomp_block )* RightC
            {
            LeftC124=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_action_block_h2141); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftC.add(LeftC124);

            // ANML.g:456:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            loop42:
            do {
                int alt42=8;
                alt42 = dfa42.predict(input);
                switch (alt42) {
            	case 1 :
            	    // ANML.g:456:5: t+= type_decl
            	    {
            	    pushFollow(FOLLOW_type_decl_in_action_block_h2149);
            	    t=type_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_decl.add(t.getTree());
            	    if (list_t==null) list_t=new ArrayList();
            	    list_t.add(t.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:457:5: c+= const_decl
            	    {
            	    pushFollow(FOLLOW_const_decl_in_action_block_h2158);
            	    c=const_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_const_decl.add(c.getTree());
            	    if (list_c==null) list_c=new ArrayList();
            	    list_c.add(c.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:458:5: f+= fluent_decl
            	    {
            	    pushFollow(FOLLOW_fluent_decl_in_action_block_h2167);
            	    f=fluent_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fluent_decl.add(f.getTree());
            	    if (list_f==null) list_f=new ArrayList();
            	    list_f.add(f.getTree());


            	    }
            	    break;
            	case 4 :
            	    // ANML.g:459:5: a+= action_decl
            	    {
            	    pushFollow(FOLLOW_action_decl_in_action_block_h2176);
            	    a=action_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_action_decl.add(a.getTree());
            	    if (list_a==null) list_a=new ArrayList();
            	    list_a.add(a.getTree());


            	    }
            	    break;
            	case 5 :
            	    // ANML.g:460:5: s+= fact_decl
            	    {
            	    pushFollow(FOLLOW_fact_decl_in_action_block_h2184);
            	    s=fact_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fact_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 6 :
            	    // ANML.g:461:5: s+= goal_decl
            	    {
            	    pushFollow(FOLLOW_goal_decl_in_action_block_h2193);
            	    s=goal_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_goal_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 7 :
            	    // ANML.g:462:5: s+= stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_action_block_h2202);
            	    s=stmt();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_stmt.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;

            	default :
            	    break loop42;
                }
            } while (true);

            // ANML.g:464:3: (d+= decomp_block )*
            loop43:
            do {
                int alt43=2;
                int LA43_0 = input.LA(1);

                if ( (LA43_0==Decomposition) ) {
                    alt43=1;
                }


                switch (alt43) {
            	case 1 :
            	    // ANML.g:464:4: d+= decomp_block
            	    {
            	    pushFollow(FOLLOW_decomp_block_in_action_block_h2214);
            	    d=decomp_block();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_decomp_block.add(d.getTree());
            	    if (list_d==null) list_d=new ArrayList();
            	    list_d.add(d.getTree());


            	    }
            	    break;

            	default :
            	    break loop43;
                }
            } while (true);

            RightC125=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_action_block_h2220); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightC.add(RightC125);



            // AST REWRITE
            // elements: d, a, t, f, s, c
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: f, d, t, s, c, a
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",list_f);
            RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",list_d);
            RewriteRuleSubtreeStream stream_t=new RewriteRuleSubtreeStream(adaptor,"token t",list_t);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"token c",list_c);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",list_a);
            root_0 = (ANMLToken)adaptor.nil();
            // 466:3: -> ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ^( Decompositions ( $d)* )
            {
                // ANML.g:467:4: ^( Types ( $t)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Types, "Types"), root_1);

                // ANML.g:467:12: ( $t)*
                while ( stream_t.hasNext() ) {
                    adaptor.addChild(root_1, stream_t.nextTree());

                }
                stream_t.reset();

                adaptor.addChild(root_0, root_1);
                }
                // ANML.g:468:4: ^( Constants ( $c)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constants, "Constants"), root_1);

                // ANML.g:468:16: ( $c)*
                while ( stream_c.hasNext() ) {
                    adaptor.addChild(root_1, stream_c.nextTree());

                }
                stream_c.reset();

                adaptor.addChild(root_0, root_1);
                }
                // ANML.g:469:4: ^( Fluents ( $f)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluents, "Fluents"), root_1);

                // ANML.g:469:14: ( $f)*
                while ( stream_f.hasNext() ) {
                    adaptor.addChild(root_1, stream_f.nextTree());

                }
                stream_f.reset();

                adaptor.addChild(root_0, root_1);
                }
                // ANML.g:470:4: ^( Actions ( $a)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Actions, "Actions"), root_1);

                // ANML.g:470:14: ( $a)*
                while ( stream_a.hasNext() ) {
                    adaptor.addChild(root_1, stream_a.nextTree());

                }
                stream_a.reset();

                adaptor.addChild(root_0, root_1);
                }
                // ANML.g:471:4: ^( Stmts ( $s)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Stmts, "Stmts"), root_1);

                // ANML.g:471:12: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_1, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_0, root_1);
                }
                // ANML.g:472:4: ^( Decompositions ( $d)* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Decompositions, "Decompositions"), root_1);

                // ANML.g:472:21: ( $d)*
                while ( stream_d.hasNext() ) {
                    adaptor.addChild(root_1, stream_d.nextTree());

                }
                stream_d.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "action_block_h"

    public static class decomp_block_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "decomp_block"
    // ANML.g:475:1: decomp_block : Decomposition (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* -> ^( Block[$Decomposition,\"DecompositionBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) ;
    public final ANMLParser.decomp_block_return decomp_block() throws RecognitionException {
        ANMLParser.decomp_block_return retval = new ANMLParser.decomp_block_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Decomposition126=null;
        List list_t=null;
        List list_c=null;
        List list_f=null;
        List list_a=null;
        List list_s=null;
        RuleReturnScope t = null;
        RuleReturnScope c = null;
        RuleReturnScope f = null;
        RuleReturnScope a = null;
        RuleReturnScope s = null;
        ANMLToken Decomposition126_tree=null;
        RewriteRuleTokenStream stream_Decomposition=new RewriteRuleTokenStream(adaptor,"token Decomposition");
        RewriteRuleSubtreeStream stream_fact_decl=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl");
        RewriteRuleSubtreeStream stream_goal_decl=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl");
        RewriteRuleSubtreeStream stream_type_decl=new RewriteRuleSubtreeStream(adaptor,"rule type_decl");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_fluent_decl=new RewriteRuleSubtreeStream(adaptor,"rule fluent_decl");
        RewriteRuleSubtreeStream stream_const_decl=new RewriteRuleSubtreeStream(adaptor,"rule const_decl");
        RewriteRuleSubtreeStream stream_action_decl=new RewriteRuleSubtreeStream(adaptor,"rule action_decl");
        try {
            // ANML.g:476:2: ( Decomposition (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* -> ^( Block[$Decomposition,\"DecompositionBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) )
            // ANML.g:476:4: Decomposition (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            {
            Decomposition126=(ANMLToken)match(input,Decomposition,FOLLOW_Decomposition_in_decomp_block2310); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Decomposition.add(Decomposition126);

            // ANML.g:478:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            loop44:
            do {
                int alt44=8;
                alt44 = dfa44.predict(input);
                switch (alt44) {
            	case 1 :
            	    // ANML.g:478:5: t+= type_decl
            	    {
            	    pushFollow(FOLLOW_type_decl_in_decomp_block2320);
            	    t=type_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_decl.add(t.getTree());
            	    if (list_t==null) list_t=new ArrayList();
            	    list_t.add(t.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:479:5: c+= const_decl
            	    {
            	    pushFollow(FOLLOW_const_decl_in_decomp_block2329);
            	    c=const_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_const_decl.add(c.getTree());
            	    if (list_c==null) list_c=new ArrayList();
            	    list_c.add(c.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:480:5: f+= fluent_decl
            	    {
            	    pushFollow(FOLLOW_fluent_decl_in_decomp_block2338);
            	    f=fluent_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fluent_decl.add(f.getTree());
            	    if (list_f==null) list_f=new ArrayList();
            	    list_f.add(f.getTree());


            	    }
            	    break;
            	case 4 :
            	    // ANML.g:481:5: a+= action_decl
            	    {
            	    pushFollow(FOLLOW_action_decl_in_decomp_block2347);
            	    a=action_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_action_decl.add(a.getTree());
            	    if (list_a==null) list_a=new ArrayList();
            	    list_a.add(a.getTree());


            	    }
            	    break;
            	case 5 :
            	    // ANML.g:482:5: s+= fact_decl
            	    {
            	    pushFollow(FOLLOW_fact_decl_in_decomp_block2355);
            	    s=fact_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fact_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 6 :
            	    // ANML.g:483:5: s+= goal_decl
            	    {
            	    pushFollow(FOLLOW_goal_decl_in_decomp_block2364);
            	    s=goal_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_goal_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 7 :
            	    // ANML.g:484:5: s+= stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_decomp_block2373);
            	    s=stmt();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_stmt.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;

            	default :
            	    break loop44;
                }
            } while (true);



            // AST REWRITE
            // elements: c, s, a, t, f
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: f, t, s, c, a
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",list_f);
            RewriteRuleSubtreeStream stream_t=new RewriteRuleSubtreeStream(adaptor,"token t",list_t);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"token c",list_c);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",list_a);
            root_0 = (ANMLToken)adaptor.nil();
            // 486:4: -> ^( Block[$Decomposition,\"DecompositionBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
            {
                // ANML.g:487:3: ^( Block[$Decomposition,\"DecompositionBlock\"] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Block, Decomposition126, "DecompositionBlock"), root_1);

                // ANML.g:489:4: ^( Types ( $t)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Types, "Types"), root_2);

                // ANML.g:489:12: ( $t)*
                while ( stream_t.hasNext() ) {
                    adaptor.addChild(root_2, stream_t.nextTree());

                }
                stream_t.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:490:4: ^( Constants ( $c)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constants, "Constants"), root_2);

                // ANML.g:490:16: ( $c)*
                while ( stream_c.hasNext() ) {
                    adaptor.addChild(root_2, stream_c.nextTree());

                }
                stream_c.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:491:4: ^( Fluents ( $f)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluents, "Fluents"), root_2);

                // ANML.g:491:14: ( $f)*
                while ( stream_f.hasNext() ) {
                    adaptor.addChild(root_2, stream_f.nextTree());

                }
                stream_f.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:492:4: ^( Actions ( $a)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Actions, "Actions"), root_2);

                // ANML.g:492:14: ( $a)*
                while ( stream_a.hasNext() ) {
                    adaptor.addChild(root_2, stream_a.nextTree());

                }
                stream_a.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:493:4: ^( Stmts ( $s)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Stmts, "Stmts"), root_2);

                // ANML.g:493:12: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_2, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "decomp_block"

    public static class stmt_block_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_block"
    // ANML.g:497:1: stmt_block : LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* RightC -> ^( Block[$LeftC] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) ;
    public final ANMLParser.stmt_block_return stmt_block() throws RecognitionException {
        ANMLParser.stmt_block_return retval = new ANMLParser.stmt_block_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftC127=null;
        ANMLToken RightC128=null;
        List list_t=null;
        List list_c=null;
        List list_f=null;
        List list_a=null;
        List list_s=null;
        RuleReturnScope t = null;
        RuleReturnScope c = null;
        RuleReturnScope f = null;
        RuleReturnScope a = null;
        RuleReturnScope s = null;
        ANMLToken LeftC127_tree=null;
        ANMLToken RightC128_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleSubtreeStream stream_fact_decl=new RewriteRuleSubtreeStream(adaptor,"rule fact_decl");
        RewriteRuleSubtreeStream stream_goal_decl=new RewriteRuleSubtreeStream(adaptor,"rule goal_decl");
        RewriteRuleSubtreeStream stream_type_decl=new RewriteRuleSubtreeStream(adaptor,"rule type_decl");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_fluent_decl=new RewriteRuleSubtreeStream(adaptor,"rule fluent_decl");
        RewriteRuleSubtreeStream stream_const_decl=new RewriteRuleSubtreeStream(adaptor,"rule const_decl");
        RewriteRuleSubtreeStream stream_action_decl=new RewriteRuleSubtreeStream(adaptor,"rule action_decl");
        try {
            // ANML.g:498:2: ( LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* RightC -> ^( Block[$LeftC] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) ) )
            // ANML.g:498:4: LeftC (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )* RightC
            {
            LeftC127=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_stmt_block2464); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftC.add(LeftC127);

            // ANML.g:499:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*
            loop45:
            do {
                int alt45=8;
                alt45 = dfa45.predict(input);
                switch (alt45) {
            	case 1 :
            	    // ANML.g:499:5: t+= type_decl
            	    {
            	    pushFollow(FOLLOW_type_decl_in_stmt_block2472);
            	    t=type_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_decl.add(t.getTree());
            	    if (list_t==null) list_t=new ArrayList();
            	    list_t.add(t.getTree());


            	    }
            	    break;
            	case 2 :
            	    // ANML.g:500:5: c+= const_decl
            	    {
            	    pushFollow(FOLLOW_const_decl_in_stmt_block2481);
            	    c=const_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_const_decl.add(c.getTree());
            	    if (list_c==null) list_c=new ArrayList();
            	    list_c.add(c.getTree());


            	    }
            	    break;
            	case 3 :
            	    // ANML.g:501:5: f+= fluent_decl
            	    {
            	    pushFollow(FOLLOW_fluent_decl_in_stmt_block2490);
            	    f=fluent_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fluent_decl.add(f.getTree());
            	    if (list_f==null) list_f=new ArrayList();
            	    list_f.add(f.getTree());


            	    }
            	    break;
            	case 4 :
            	    // ANML.g:502:5: a+= action_decl
            	    {
            	    pushFollow(FOLLOW_action_decl_in_stmt_block2499);
            	    a=action_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_action_decl.add(a.getTree());
            	    if (list_a==null) list_a=new ArrayList();
            	    list_a.add(a.getTree());


            	    }
            	    break;
            	case 5 :
            	    // ANML.g:503:5: s+= fact_decl
            	    {
            	    pushFollow(FOLLOW_fact_decl_in_stmt_block2507);
            	    s=fact_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_fact_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 6 :
            	    // ANML.g:504:5: s+= goal_decl
            	    {
            	    pushFollow(FOLLOW_goal_decl_in_stmt_block2516);
            	    s=goal_decl();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_goal_decl.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;
            	case 7 :
            	    // ANML.g:505:5: s+= stmt
            	    {
            	    pushFollow(FOLLOW_stmt_in_stmt_block2525);
            	    s=stmt();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_stmt.add(s.getTree());
            	    if (list_s==null) list_s=new ArrayList();
            	    list_s.add(s.getTree());


            	    }
            	    break;

            	default :
            	    break loop45;
                }
            } while (true);

            RightC128=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_stmt_block2537); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightC.add(RightC128);



            // AST REWRITE
            // elements: s, a, t, f, c
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: f, t, s, c, a
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",list_f);
            RewriteRuleSubtreeStream stream_t=new RewriteRuleSubtreeStream(adaptor,"token t",list_t);
            RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"token s",list_s);
            RewriteRuleSubtreeStream stream_c=new RewriteRuleSubtreeStream(adaptor,"token c",list_c);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",list_a);
            root_0 = (ANMLToken)adaptor.nil();
            // 508:4: -> ^( Block[$LeftC] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
            {
                // ANML.g:509:3: ^( Block[$LeftC] ^( Types ( $t)* ) ^( Constants ( $c)* ) ^( Fluents ( $f)* ) ^( Actions ( $a)* ) ^( Stmts ( $s)* ) )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Block, LeftC127), root_1);

                // ANML.g:510:4: ^( Types ( $t)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Types, "Types"), root_2);

                // ANML.g:510:12: ( $t)*
                while ( stream_t.hasNext() ) {
                    adaptor.addChild(root_2, stream_t.nextTree());

                }
                stream_t.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:511:4: ^( Constants ( $c)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Constants, "Constants"), root_2);

                // ANML.g:511:16: ( $c)*
                while ( stream_c.hasNext() ) {
                    adaptor.addChild(root_2, stream_c.nextTree());

                }
                stream_c.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:512:4: ^( Fluents ( $f)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Fluents, "Fluents"), root_2);

                // ANML.g:512:14: ( $f)*
                while ( stream_f.hasNext() ) {
                    adaptor.addChild(root_2, stream_f.nextTree());

                }
                stream_f.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:513:4: ^( Actions ( $a)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Actions, "Actions"), root_2);

                // ANML.g:513:14: ( $a)*
                while ( stream_a.hasNext() ) {
                    adaptor.addChild(root_2, stream_a.nextTree());

                }
                stream_a.reset();

                adaptor.addChild(root_1, root_2);
                }
                // ANML.g:514:4: ^( Stmts ( $s)* )
                {
                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Stmts, "Stmts"), root_2);

                // ANML.g:514:12: ( $s)*
                while ( stream_s.hasNext() ) {
                    adaptor.addChild(root_2, stream_s.nextTree());

                }
                stream_s.reset();

                adaptor.addChild(root_1, root_2);
                }

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_block"

    public static class stmt_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt"
    // ANML.g:518:1: stmt : ( ( stmt_primitive )=> stmt_primitive | ( stmt_block )=> stmt_block | ( stmt_timed )=> stmt_timed | stmt_contains | stmt_when | stmt_forall | stmt_exists );
    public final ANMLParser.stmt_return stmt() throws RecognitionException {
        ANMLParser.stmt_return retval = new ANMLParser.stmt_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.stmt_primitive_return stmt_primitive129 = null;

        ANMLParser.stmt_block_return stmt_block130 = null;

        ANMLParser.stmt_timed_return stmt_timed131 = null;

        ANMLParser.stmt_contains_return stmt_contains132 = null;

        ANMLParser.stmt_when_return stmt_when133 = null;

        ANMLParser.stmt_forall_return stmt_forall134 = null;

        ANMLParser.stmt_exists_return stmt_exists135 = null;



        try {
            // ANML.g:519:2: ( ( stmt_primitive )=> stmt_primitive | ( stmt_block )=> stmt_block | ( stmt_timed )=> stmt_timed | stmt_contains | stmt_when | stmt_forall | stmt_exists )
            int alt46=7;
            alt46 = dfa46.predict(input);
            switch (alt46) {
                case 1 :
                    // ANML.g:519:4: ( stmt_primitive )=> stmt_primitive
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_primitive_in_stmt2628);
                    stmt_primitive129=stmt_primitive();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_primitive129.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:520:4: ( stmt_block )=> stmt_block
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_block_in_stmt2638);
                    stmt_block130=stmt_block();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_block130.getTree());

                    }
                    break;
                case 3 :
                    // ANML.g:521:4: ( stmt_timed )=> stmt_timed
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_timed_in_stmt2648);
                    stmt_timed131=stmt_timed();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_timed131.getTree());

                    }
                    break;
                case 4 :
                    // ANML.g:522:4: stmt_contains
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_contains_in_stmt2653);
                    stmt_contains132=stmt_contains();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_contains132.getTree());

                    }
                    break;
                case 5 :
                    // ANML.g:523:4: stmt_when
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_when_in_stmt2658);
                    stmt_when133=stmt_when();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_when133.getTree());

                    }
                    break;
                case 6 :
                    // ANML.g:524:4: stmt_forall
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_forall_in_stmt2663);
                    stmt_forall134=stmt_forall();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_forall134.getTree());

                    }
                    break;
                case 7 :
                    // ANML.g:525:4: stmt_exists
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_exists_in_stmt2668);
                    stmt_exists135=stmt_exists();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_exists135.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt"

    public static class stmt_contains_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_contains"
    // ANML.g:528:1: stmt_contains : Contains ( ( exist_time stmt )=> exist_time stmt -> ^( ContainsSomeStmt[$Contains] exist_time stmt ) | stmt -> ^( ContainsAllStmt[$Contains] stmt ) ) ;
    public final ANMLParser.stmt_contains_return stmt_contains() throws RecognitionException {
        ANMLParser.stmt_contains_return retval = new ANMLParser.stmt_contains_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Contains136=null;
        ANMLParser.exist_time_return exist_time137 = null;

        ANMLParser.stmt_return stmt138 = null;

        ANMLParser.stmt_return stmt139 = null;


        ANMLToken Contains136_tree=null;
        RewriteRuleTokenStream stream_Contains=new RewriteRuleTokenStream(adaptor,"token Contains");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_exist_time=new RewriteRuleSubtreeStream(adaptor,"rule exist_time");
        try {
            // ANML.g:529:2: ( Contains ( ( exist_time stmt )=> exist_time stmt -> ^( ContainsSomeStmt[$Contains] exist_time stmt ) | stmt -> ^( ContainsAllStmt[$Contains] stmt ) ) )
            // ANML.g:529:4: Contains ( ( exist_time stmt )=> exist_time stmt -> ^( ContainsSomeStmt[$Contains] exist_time stmt ) | stmt -> ^( ContainsAllStmt[$Contains] stmt ) )
            {
            Contains136=(ANMLToken)match(input,Contains,FOLLOW_Contains_in_stmt_contains2678); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Contains.add(Contains136);

            // ANML.g:530:3: ( ( exist_time stmt )=> exist_time stmt -> ^( ContainsSomeStmt[$Contains] exist_time stmt ) | stmt -> ^( ContainsAllStmt[$Contains] stmt ) )
            int alt47=2;
            alt47 = dfa47.predict(input);
            switch (alt47) {
                case 1 :
                    // ANML.g:530:4: ( exist_time stmt )=> exist_time stmt
                    {
                    pushFollow(FOLLOW_exist_time_in_stmt_contains2691);
                    exist_time137=exist_time();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_exist_time.add(exist_time137.getTree());
                    pushFollow(FOLLOW_stmt_in_stmt_contains2693);
                    stmt138=stmt();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_stmt.add(stmt138.getTree());


                    // AST REWRITE
                    // elements: exist_time, stmt
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 531:4: -> ^( ContainsSomeStmt[$Contains] exist_time stmt )
                    {
                        // ANML.g:531:7: ^( ContainsSomeStmt[$Contains] exist_time stmt )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ContainsSomeStmt, Contains136), root_1);

                        adaptor.addChild(root_1, stream_exist_time.nextTree());
                        adaptor.addChild(root_1, stream_stmt.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:532:5: stmt
                    {
                    pushFollow(FOLLOW_stmt_in_stmt_contains2713);
                    stmt139=stmt();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_stmt.add(stmt139.getTree());


                    // AST REWRITE
                    // elements: stmt
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 533:4: -> ^( ContainsAllStmt[$Contains] stmt )
                    {
                        // ANML.g:533:7: ^( ContainsAllStmt[$Contains] stmt )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ContainsAllStmt, Contains136), root_1);

                        adaptor.addChild(root_1, stream_stmt.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_contains"

    public static class stmt_when_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_when"
    // ANML.g:537:1: stmt_when : When guard stmt ( ( Else )=> Else stmt -> ^( WhenElse[$When] guard stmt stmt ) | -> ^( When guard stmt ) ) ;
    public final ANMLParser.stmt_when_return stmt_when() throws RecognitionException {
        ANMLParser.stmt_when_return retval = new ANMLParser.stmt_when_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken When140=null;
        ANMLToken Else143=null;
        ANMLParser.guard_return guard141 = null;

        ANMLParser.stmt_return stmt142 = null;

        ANMLParser.stmt_return stmt144 = null;


        ANMLToken When140_tree=null;
        ANMLToken Else143_tree=null;
        RewriteRuleTokenStream stream_Else=new RewriteRuleTokenStream(adaptor,"token Else");
        RewriteRuleTokenStream stream_When=new RewriteRuleTokenStream(adaptor,"token When");
        RewriteRuleSubtreeStream stream_guard=new RewriteRuleSubtreeStream(adaptor,"rule guard");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        try {
            // ANML.g:538:2: ( When guard stmt ( ( Else )=> Else stmt -> ^( WhenElse[$When] guard stmt stmt ) | -> ^( When guard stmt ) ) )
            // ANML.g:538:4: When guard stmt ( ( Else )=> Else stmt -> ^( WhenElse[$When] guard stmt stmt ) | -> ^( When guard stmt ) )
            {
            When140=(ANMLToken)match(input,When,FOLLOW_When_in_stmt_when2740); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_When.add(When140);

            pushFollow(FOLLOW_guard_in_stmt_when2742);
            guard141=guard();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_guard.add(guard141.getTree());
            pushFollow(FOLLOW_stmt_in_stmt_when2744);
            stmt142=stmt();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_stmt.add(stmt142.getTree());
            // ANML.g:539:3: ( ( Else )=> Else stmt -> ^( WhenElse[$When] guard stmt stmt ) | -> ^( When guard stmt ) )
            int alt48=2;
            int LA48_0 = input.LA(1);

            if ( (LA48_0==Else) ) {
                int LA48_1 = input.LA(2);

                if ( (synpred7_ANML()) ) {
                    alt48=1;
                }
                else if ( (true) ) {
                    alt48=2;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 48, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA48_0==EOF||(LA48_0>=Type && LA48_0<=Fluent)||LA48_0==Constant||LA48_0==Action||(LA48_0>=Bra && LA48_0<=Ket)||LA48_0==When||LA48_0==ID||LA48_0==Predicate||LA48_0==Semi||LA48_0==LeftP||(LA48_0>=Variable && LA48_0<=NotBit)||(LA48_0>=Goal && LA48_0<=Duration)||(LA48_0>=Decomposition && LA48_0<=Contains)||(LA48_0>=ForAll && LA48_0<=Exists)||LA48_0==Delta||LA48_0==Dots||LA48_0==Minus||(LA48_0>=Unordered && LA48_0<=Ordered)||(LA48_0>=Start && LA48_0<=Infinity)) ) {
                alt48=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 48, 0, input);

                throw nvae;
            }
            switch (alt48) {
                case 1 :
                    // ANML.g:539:5: ( Else )=> Else stmt
                    {
                    Else143=(ANMLToken)match(input,Else,FOLLOW_Else_in_stmt_when2757); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Else.add(Else143);

                    pushFollow(FOLLOW_stmt_in_stmt_when2759);
                    stmt144=stmt();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_stmt.add(stmt144.getTree());


                    // AST REWRITE
                    // elements: guard, stmt, stmt
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 540:4: -> ^( WhenElse[$When] guard stmt stmt )
                    {
                        // ANML.g:540:7: ^( WhenElse[$When] guard stmt stmt )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(WhenElse, When140), root_1);

                        adaptor.addChild(root_1, stream_guard.nextTree());
                        adaptor.addChild(root_1, stream_stmt.nextTree());
                        adaptor.addChild(root_1, stream_stmt.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:542:4: 
                    {

                    // AST REWRITE
                    // elements: guard, stmt, When
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 542:4: -> ^( When guard stmt )
                    {
                        // ANML.g:542:7: ^( When guard stmt )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot(stream_When.nextNode(), root_1);

                        adaptor.addChild(root_1, stream_guard.nextTree());
                        adaptor.addChild(root_1, stream_stmt.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_when"

    public static class stmt_forall_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_forall"
    // ANML.g:546:1: stmt_forall : ForAll param_list stmt -> ^( ForAllStmt[$ForAll] param_list stmt ) ;
    public final ANMLParser.stmt_forall_return stmt_forall() throws RecognitionException {
        ANMLParser.stmt_forall_return retval = new ANMLParser.stmt_forall_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ForAll145=null;
        ANMLParser.param_list_return param_list146 = null;

        ANMLParser.stmt_return stmt147 = null;


        ANMLToken ForAll145_tree=null;
        RewriteRuleTokenStream stream_ForAll=new RewriteRuleTokenStream(adaptor,"token ForAll");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:547:2: ( ForAll param_list stmt -> ^( ForAllStmt[$ForAll] param_list stmt ) )
            // ANML.g:547:4: ForAll param_list stmt
            {
            ForAll145=(ANMLToken)match(input,ForAll,FOLLOW_ForAll_in_stmt_forall2807); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ForAll.add(ForAll145);

            pushFollow(FOLLOW_param_list_in_stmt_forall2809);
            param_list146=param_list();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_list.add(param_list146.getTree());
            pushFollow(FOLLOW_stmt_in_stmt_forall2811);
            stmt147=stmt();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_stmt.add(stmt147.getTree());


            // AST REWRITE
            // elements: stmt, param_list
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 548:3: -> ^( ForAllStmt[$ForAll] param_list stmt )
            {
                // ANML.g:548:6: ^( ForAllStmt[$ForAll] param_list stmt )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ForAllStmt, ForAll145), root_1);

                adaptor.addChild(root_1, stream_param_list.nextTree());
                adaptor.addChild(root_1, stream_stmt.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_forall"

    public static class stmt_exists_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_exists"
    // ANML.g:551:1: stmt_exists : Exists param_list stmt -> ^( ExistsStmt[$Exists] param_list stmt ) ;
    public final ANMLParser.stmt_exists_return stmt_exists() throws RecognitionException {
        ANMLParser.stmt_exists_return retval = new ANMLParser.stmt_exists_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Exists148=null;
        ANMLParser.param_list_return param_list149 = null;

        ANMLParser.stmt_return stmt150 = null;


        ANMLToken Exists148_tree=null;
        RewriteRuleTokenStream stream_Exists=new RewriteRuleTokenStream(adaptor,"token Exists");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:552:2: ( Exists param_list stmt -> ^( ExistsStmt[$Exists] param_list stmt ) )
            // ANML.g:552:4: Exists param_list stmt
            {
            Exists148=(ANMLToken)match(input,Exists,FOLLOW_Exists_in_stmt_exists2834); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Exists.add(Exists148);

            pushFollow(FOLLOW_param_list_in_stmt_exists2836);
            param_list149=param_list();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_param_list.add(param_list149.getTree());
            pushFollow(FOLLOW_stmt_in_stmt_exists2838);
            stmt150=stmt();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_stmt.add(stmt150.getTree());


            // AST REWRITE
            // elements: param_list, stmt
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 553:3: -> ^( ExistsStmt[$Exists] param_list stmt )
            {
                // ANML.g:553:6: ^( ExistsStmt[$Exists] param_list stmt )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ExistsStmt, Exists148), root_1);

                adaptor.addChild(root_1, stream_param_list.nextTree());
                adaptor.addChild(root_1, stream_stmt.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_exists"

    public static class stmt_timed_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_timed"
    // ANML.g:556:1: stmt_timed : interval stmt -> ^( TimedStmt interval stmt ) ;
    public final ANMLParser.stmt_timed_return stmt_timed() throws RecognitionException {
        ANMLParser.stmt_timed_return retval = new ANMLParser.stmt_timed_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.interval_return interval151 = null;

        ANMLParser.stmt_return stmt152 = null;


        RewriteRuleSubtreeStream stream_interval=new RewriteRuleSubtreeStream(adaptor,"rule interval");
        RewriteRuleSubtreeStream stream_stmt=new RewriteRuleSubtreeStream(adaptor,"rule stmt");
        try {
            // ANML.g:557:2: ( interval stmt -> ^( TimedStmt interval stmt ) )
            // ANML.g:557:4: interval stmt
            {
            pushFollow(FOLLOW_interval_in_stmt_timed2861);
            interval151=interval();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_interval.add(interval151.getTree());
            pushFollow(FOLLOW_stmt_in_stmt_timed2863);
            stmt152=stmt();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_stmt.add(stmt152.getTree());


            // AST REWRITE
            // elements: stmt, interval
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 558:3: -> ^( TimedStmt interval stmt )
            {
                // ANML.g:558:6: ^( TimedStmt interval stmt )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedStmt, "TimedStmt"), root_1);

                adaptor.addChild(root_1, stream_interval.nextTree());
                adaptor.addChild(root_1, stream_stmt.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_timed"

    public static class stmt_primitive_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_primitive"
    // ANML.g:561:1: stmt_primitive : ( ( expr Semi )=> expr Semi | ( stmt_chain Semi )=> stmt_chain Semi | ( stmt_delta_chain Semi )=> stmt_delta_chain Semi | ( stmt_timeless Semi )=> stmt_timeless Semi | Semi -> Skip );
    public final ANMLParser.stmt_primitive_return stmt_primitive() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.stmt_primitive_return retval = new ANMLParser.stmt_primitive_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Semi154=null;
        ANMLToken Semi156=null;
        ANMLToken Semi158=null;
        ANMLToken Semi160=null;
        ANMLToken Semi161=null;
        ANMLParser.expr_return expr153 = null;

        ANMLParser.stmt_chain_return stmt_chain155 = null;

        ANMLParser.stmt_delta_chain_return stmt_delta_chain157 = null;

        ANMLParser.stmt_timeless_return stmt_timeless159 = null;


        ANMLToken Semi154_tree=null;
        ANMLToken Semi156_tree=null;
        ANMLToken Semi158_tree=null;
        ANMLToken Semi160_tree=null;
        ANMLToken Semi161_tree=null;
        RewriteRuleTokenStream stream_Semi=new RewriteRuleTokenStream(adaptor,"token Semi");

        try {
            // ANML.g:562:2: ( ( expr Semi )=> expr Semi | ( stmt_chain Semi )=> stmt_chain Semi | ( stmt_delta_chain Semi )=> stmt_delta_chain Semi | ( stmt_timeless Semi )=> stmt_timeless Semi | Semi -> Skip )
            int alt49=5;
            alt49 = dfa49.predict(input);
            switch (alt49) {
                case 1 :
                    // ANML.g:562:4: ( expr Semi )=> expr Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_expr_in_stmt_primitive2899);
                    expr153=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, expr153.getTree());
                    Semi154=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_stmt_primitive2901); if (state.failed) return retval;

                    }
                    break;
                case 2 :
                    // ANML.g:563:6: ( stmt_chain Semi )=> stmt_chain Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_chain_in_stmt_primitive2916);
                    stmt_chain155=stmt_chain();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_chain155.getTree());
                    Semi156=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_stmt_primitive2918); if (state.failed) return retval;

                    }
                    break;
                case 3 :
                    // ANML.g:564:4: ( stmt_delta_chain Semi )=> stmt_delta_chain Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_delta_chain_in_stmt_primitive2931);
                    stmt_delta_chain157=stmt_delta_chain();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_delta_chain157.getTree());
                    Semi158=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_stmt_primitive2933); if (state.failed) return retval;

                    }
                    break;
                case 4 :
                    // ANML.g:565:6: ( stmt_timeless Semi )=> stmt_timeless Semi
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_stmt_timeless_in_stmt_primitive2948);
                    stmt_timeless159=stmt_timeless();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, stmt_timeless159.getTree());
                    Semi160=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_stmt_primitive2950); if (state.failed) return retval;

                    }
                    break;
                case 5 :
                    // ANML.g:566:6: Semi
                    {
                    Semi161=(ANMLToken)match(input,Semi,FOLLOW_Semi_in_stmt_primitive2958); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Semi.add(Semi161);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 566:11: -> Skip
                    {
                        adaptor.addChild(root_0, (ANMLToken)adaptor.create(Skip, "Skip"));

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "stmt_primitive"

    public static class stmt_chain_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_chain"
    // ANML.g:569:1: stmt_chain : ( ref (e+= stmt_chain_1 )+ -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ref ( $e)+ ) | ( interval ref ( stmt_chain_1 )+ )=> interval ref (e+= stmt_chain_1 )+ -> ^( Chain interval ref ( $e)+ ) );
    public final ANMLParser.stmt_chain_return stmt_chain() throws RecognitionException {
        ANMLParser.stmt_chain_return retval = new ANMLParser.stmt_chain_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        List list_e=null;
        ANMLParser.ref_return ref162 = null;

        ANMLParser.interval_return interval163 = null;

        ANMLParser.ref_return ref164 = null;

        RuleReturnScope e = null;
        RewriteRuleSubtreeStream stream_ref=new RewriteRuleSubtreeStream(adaptor,"rule ref");
        RewriteRuleSubtreeStream stream_interval=new RewriteRuleSubtreeStream(adaptor,"rule interval");
        RewriteRuleSubtreeStream stream_stmt_chain_1=new RewriteRuleSubtreeStream(adaptor,"rule stmt_chain_1");
        try {
            // ANML.g:570:2: ( ref (e+= stmt_chain_1 )+ -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ref ( $e)+ ) | ( interval ref ( stmt_chain_1 )+ )=> interval ref (e+= stmt_chain_1 )+ -> ^( Chain interval ref ( $e)+ ) )
            int alt52=2;
            int LA52_0 = input.LA(1);

            if ( (LA52_0==ID) ) {
                alt52=1;
            }
            else if ( (LA52_0==LeftB) && (synpred12_ANML())) {
                alt52=2;
            }
            else if ( (LA52_0==LeftP) && (synpred12_ANML())) {
                alt52=2;
            }
            else if ( (LA52_0==Dots) && (synpred12_ANML())) {
                alt52=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 52, 0, input);

                throw nvae;
            }
            switch (alt52) {
                case 1 :
                    // ANML.g:570:4: ref (e+= stmt_chain_1 )+
                    {
                    pushFollow(FOLLOW_ref_in_stmt_chain2972);
                    ref162=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref162.getTree());
                    // ANML.g:570:9: (e+= stmt_chain_1 )+
                    int cnt50=0;
                    loop50:
                    do {
                        int alt50=2;
                        int LA50_0 = input.LA(1);

                        if ( ((LA50_0>=LessThan && LA50_0<=Assign)||LA50_0==Comma||LA50_0==Undefine||LA50_0==Equal||(LA50_0>=Change && LA50_0<=Skip)||(LA50_0>=NotEqual && LA50_0<=GreaterThanE)) ) {
                            alt50=1;
                        }


                        switch (alt50) {
                    	case 1 :
                    	    // ANML.g:570:9: e+= stmt_chain_1
                    	    {
                    	    pushFollow(FOLLOW_stmt_chain_1_in_stmt_chain2976);
                    	    e=stmt_chain_1();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_stmt_chain_1.add(e.getTree());
                    	    if (list_e==null) list_e=new ArrayList();
                    	    list_e.add(e.getTree());


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt50 >= 1 ) break loop50;
                    	    if (state.backtracking>0) {state.failed=true; return retval;}
                                EarlyExitException eee =
                                    new EarlyExitException(50, input);
                                throw eee;
                        }
                        cnt50++;
                    } while (true);



                    // AST REWRITE
                    // elements: e, ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: e
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",list_e);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 571:5: -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ref ( $e)+ )
                    {
                        // ANML.g:571:8: ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ref ( $e)+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Chain, "Chain"), root_1);

                        // ANML.g:571:16: ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_2);

                        // ANML.g:571:35: ^( TBra Bra )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TBra, "TBra"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Bra, "Bra"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:571:47: ^( TStart Start )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:571:63: ^( TDuration Duration )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Duration, "Duration"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:571:85: ^( TEnd End )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(End, "End"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:571:97: ^( TKet Ket )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TKet, "TKet"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Ket, "Ket"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        adaptor.addChild(root_1, stream_ref.nextTree());
                        if ( !(stream_e.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_e.hasNext() ) {
                            adaptor.addChild(root_1, stream_e.nextTree());

                        }
                        stream_e.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:572:4: ( interval ref ( stmt_chain_1 )+ )=> interval ref (e+= stmt_chain_1 )+
                    {
                    pushFollow(FOLLOW_interval_in_stmt_chain3043);
                    interval163=interval();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_interval.add(interval163.getTree());
                    pushFollow(FOLLOW_ref_in_stmt_chain3045);
                    ref164=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref164.getTree());
                    // ANML.g:572:49: (e+= stmt_chain_1 )+
                    int cnt51=0;
                    loop51:
                    do {
                        int alt51=2;
                        int LA51_0 = input.LA(1);

                        if ( ((LA51_0>=LessThan && LA51_0<=Assign)||LA51_0==Comma||LA51_0==Undefine||LA51_0==Equal||(LA51_0>=Change && LA51_0<=Skip)||(LA51_0>=NotEqual && LA51_0<=GreaterThanE)) ) {
                            alt51=1;
                        }


                        switch (alt51) {
                    	case 1 :
                    	    // ANML.g:572:49: e+= stmt_chain_1
                    	    {
                    	    pushFollow(FOLLOW_stmt_chain_1_in_stmt_chain3049);
                    	    e=stmt_chain_1();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_stmt_chain_1.add(e.getTree());
                    	    if (list_e==null) list_e=new ArrayList();
                    	    list_e.add(e.getTree());


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt51 >= 1 ) break loop51;
                    	    if (state.backtracking>0) {state.failed=true; return retval;}
                                EarlyExitException eee =
                                    new EarlyExitException(51, input);
                                throw eee;
                        }
                        cnt51++;
                    } while (true);



                    // AST REWRITE
                    // elements: interval, ref, e
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: e
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",list_e);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 573:3: -> ^( Chain interval ref ( $e)+ )
                    {
                        // ANML.g:573:6: ^( Chain interval ref ( $e)+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Chain, "Chain"), root_1);

                        adaptor.addChild(root_1, stream_interval.nextTree());
                        adaptor.addChild(root_1, stream_ref.nextTree());
                        if ( !(stream_e.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_e.hasNext() ) {
                            adaptor.addChild(root_1, stream_e.nextTree());

                        }
                        stream_e.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_chain"

    public static class stmt_chain_1_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_chain_1"
    // ANML.g:575:1: stmt_chain_1 : ( ( Comma )? Assign e_num | ( Comma )? o= Change b= e_num -> Undefine ^( Assign $b) | ( Comma )? o= Produce b= e_num | ( Comma )? o= Consume b= e_num | ( Comma )? o= Lend b= e_num -> ^( Produce $b) Skip ^( Consume $b) | ( Comma )? o= Use b= e_num -> ^( Consume $b) Skip ^( Produce $b) | ( Comma )? (o= Within | o= SetAssign ) s= set | ( Comma )? i= num_relop b= e_num | ( Comma )? (o= Equal Skip | o= Skip ) -> Skip | ( Comma )? (o= Assign Undefined | o= Undefine ) -> Undefine );
    public final ANMLParser.stmt_chain_1_return stmt_chain_1() throws RecognitionException {
        ANMLParser.stmt_chain_1_return retval = new ANMLParser.stmt_chain_1_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken o=null;
        ANMLToken Comma165=null;
        ANMLToken Assign166=null;
        ANMLToken Comma168=null;
        ANMLToken Comma169=null;
        ANMLToken Comma170=null;
        ANMLToken Comma171=null;
        ANMLToken Comma172=null;
        ANMLToken Comma173=null;
        ANMLToken Comma174=null;
        ANMLToken Comma175=null;
        ANMLToken Skip176=null;
        ANMLToken Comma177=null;
        ANMLToken Undefined178=null;
        ANMLParser.e_num_return b = null;

        ANMLParser.set_return s = null;

        ANMLParser.num_relop_return i = null;

        ANMLParser.e_num_return e_num167 = null;


        ANMLToken o_tree=null;
        ANMLToken Comma165_tree=null;
        ANMLToken Assign166_tree=null;
        ANMLToken Comma168_tree=null;
        ANMLToken Comma169_tree=null;
        ANMLToken Comma170_tree=null;
        ANMLToken Comma171_tree=null;
        ANMLToken Comma172_tree=null;
        ANMLToken Comma173_tree=null;
        ANMLToken Comma174_tree=null;
        ANMLToken Comma175_tree=null;
        ANMLToken Skip176_tree=null;
        ANMLToken Comma177_tree=null;
        ANMLToken Undefined178_tree=null;
        RewriteRuleTokenStream stream_Skip=new RewriteRuleTokenStream(adaptor,"token Skip");
        RewriteRuleTokenStream stream_Assign=new RewriteRuleTokenStream(adaptor,"token Assign");
        RewriteRuleTokenStream stream_Undefine=new RewriteRuleTokenStream(adaptor,"token Undefine");
        RewriteRuleTokenStream stream_Change=new RewriteRuleTokenStream(adaptor,"token Change");
        RewriteRuleTokenStream stream_Lend=new RewriteRuleTokenStream(adaptor,"token Lend");
        RewriteRuleTokenStream stream_Equal=new RewriteRuleTokenStream(adaptor,"token Equal");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleTokenStream stream_Undefined=new RewriteRuleTokenStream(adaptor,"token Undefined");
        RewriteRuleTokenStream stream_Use=new RewriteRuleTokenStream(adaptor,"token Use");
        RewriteRuleSubtreeStream stream_e_num=new RewriteRuleSubtreeStream(adaptor,"rule e_num");
        try {
            // ANML.g:576:5: ( ( Comma )? Assign e_num | ( Comma )? o= Change b= e_num -> Undefine ^( Assign $b) | ( Comma )? o= Produce b= e_num | ( Comma )? o= Consume b= e_num | ( Comma )? o= Lend b= e_num -> ^( Produce $b) Skip ^( Consume $b) | ( Comma )? o= Use b= e_num -> ^( Consume $b) Skip ^( Produce $b) | ( Comma )? (o= Within | o= SetAssign ) s= set | ( Comma )? i= num_relop b= e_num | ( Comma )? (o= Equal Skip | o= Skip ) -> Skip | ( Comma )? (o= Assign Undefined | o= Undefine ) -> Undefine )
            int alt66=10;
            alt66 = dfa66.predict(input);
            switch (alt66) {
                case 1 :
                    // ANML.g:576:7: ( Comma )? Assign e_num
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:576:12: ( Comma )?
                    int alt53=2;
                    int LA53_0 = input.LA(1);

                    if ( (LA53_0==Comma) ) {
                        alt53=1;
                    }
                    switch (alt53) {
                        case 1 :
                            // ANML.g:576:12: Comma
                            {
                            Comma165=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13078); if (state.failed) return retval;

                            }
                            break;

                    }

                    Assign166=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_stmt_chain_13082); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    Assign166_tree = (ANMLToken)adaptor.create(Assign166);
                    root_0 = (ANMLToken)adaptor.becomeRoot(Assign166_tree, root_0);
                    }
                    pushFollow(FOLLOW_e_num_in_stmt_chain_13085);
                    e_num167=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num167.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:577:7: ( Comma )? o= Change b= e_num
                    {
                    // ANML.g:577:7: ( Comma )?
                    int alt54=2;
                    int LA54_0 = input.LA(1);

                    if ( (LA54_0==Comma) ) {
                        alt54=1;
                    }
                    switch (alt54) {
                        case 1 :
                            // ANML.g:577:7: Comma
                            {
                            Comma168=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13093); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma168);


                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Change,FOLLOW_Change_in_stmt_chain_13098); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Change.add(o);

                    pushFollow(FOLLOW_e_num_in_stmt_chain_13102);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_e_num.add(b.getTree());


                    // AST REWRITE
                    // elements: b
                    // token labels: 
                    // rule labels: retval, b
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"token b",b!=null?b.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 578:6: -> Undefine ^( Assign $b)
                    {
                        adaptor.addChild(root_0, (ANMLToken)adaptor.create(Undefine, "Undefine"));
                        // ANML.g:579:7: ^( Assign $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, "Assign"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:580:7: ( Comma )? o= Produce b= e_num
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:580:12: ( Comma )?
                    int alt55=2;
                    int LA55_0 = input.LA(1);

                    if ( (LA55_0==Comma) ) {
                        alt55=1;
                    }
                    switch (alt55) {
                        case 1 :
                            // ANML.g:580:12: Comma
                            {
                            Comma169=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13133); if (state.failed) return retval;

                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Produce,FOLLOW_Produce_in_stmt_chain_13139); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    o_tree = (ANMLToken)adaptor.create(o);
                    root_0 = (ANMLToken)adaptor.becomeRoot(o_tree, root_0);
                    }
                    pushFollow(FOLLOW_e_num_in_stmt_chain_13144);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, b.getTree());

                    }
                    break;
                case 4 :
                    // ANML.g:581:7: ( Comma )? o= Consume b= e_num
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:581:12: ( Comma )?
                    int alt56=2;
                    int LA56_0 = input.LA(1);

                    if ( (LA56_0==Comma) ) {
                        alt56=1;
                    }
                    switch (alt56) {
                        case 1 :
                            // ANML.g:581:12: Comma
                            {
                            Comma170=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13152); if (state.failed) return retval;

                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Consume,FOLLOW_Consume_in_stmt_chain_13158); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    o_tree = (ANMLToken)adaptor.create(o);
                    root_0 = (ANMLToken)adaptor.becomeRoot(o_tree, root_0);
                    }
                    pushFollow(FOLLOW_e_num_in_stmt_chain_13163);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, b.getTree());

                    }
                    break;
                case 5 :
                    // ANML.g:582:7: ( Comma )? o= Lend b= e_num
                    {
                    // ANML.g:582:7: ( Comma )?
                    int alt57=2;
                    int LA57_0 = input.LA(1);

                    if ( (LA57_0==Comma) ) {
                        alt57=1;
                    }
                    switch (alt57) {
                        case 1 :
                            // ANML.g:582:7: Comma
                            {
                            Comma171=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13171); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma171);


                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Lend,FOLLOW_Lend_in_stmt_chain_13176); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Lend.add(o);

                    pushFollow(FOLLOW_e_num_in_stmt_chain_13180);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_e_num.add(b.getTree());


                    // AST REWRITE
                    // elements: b, b
                    // token labels: 
                    // rule labels: retval, b
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"token b",b!=null?b.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 583:6: -> ^( Produce $b) Skip ^( Consume $b)
                    {
                        // ANML.g:583:9: ^( Produce $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Produce, "Produce"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }
                        adaptor.addChild(root_0, (ANMLToken)adaptor.create(Skip, "Skip"));
                        // ANML.g:585:7: ^( Consume $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Consume, "Consume"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 6 :
                    // ANML.g:586:7: ( Comma )? o= Use b= e_num
                    {
                    // ANML.g:586:7: ( Comma )?
                    int alt58=2;
                    int LA58_0 = input.LA(1);

                    if ( (LA58_0==Comma) ) {
                        alt58=1;
                    }
                    switch (alt58) {
                        case 1 :
                            // ANML.g:586:7: Comma
                            {
                            Comma172=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13223); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma172);


                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Use,FOLLOW_Use_in_stmt_chain_13228); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Use.add(o);

                    pushFollow(FOLLOW_e_num_in_stmt_chain_13232);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_e_num.add(b.getTree());


                    // AST REWRITE
                    // elements: b, b
                    // token labels: 
                    // rule labels: retval, b
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"token b",b!=null?b.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 587:6: -> ^( Consume $b) Skip ^( Produce $b)
                    {
                        // ANML.g:587:9: ^( Consume $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Consume, "Consume"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }
                        adaptor.addChild(root_0, (ANMLToken)adaptor.create(Skip, "Skip"));
                        // ANML.g:589:7: ^( Produce $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Produce, "Produce"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 7 :
                    // ANML.g:590:7: ( Comma )? (o= Within | o= SetAssign ) s= set
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:590:12: ( Comma )?
                    int alt59=2;
                    int LA59_0 = input.LA(1);

                    if ( (LA59_0==Comma) ) {
                        alt59=1;
                    }
                    switch (alt59) {
                        case 1 :
                            // ANML.g:590:12: Comma
                            {
                            Comma173=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13276); if (state.failed) return retval;

                            }
                            break;

                    }

                    // ANML.g:590:15: (o= Within | o= SetAssign )
                    int alt60=2;
                    int LA60_0 = input.LA(1);

                    if ( (LA60_0==Within) ) {
                        alt60=1;
                    }
                    else if ( (LA60_0==SetAssign) ) {
                        alt60=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 60, 0, input);

                        throw nvae;
                    }
                    switch (alt60) {
                        case 1 :
                            // ANML.g:590:16: o= Within
                            {
                            o=(ANMLToken)match(input,Within,FOLLOW_Within_in_stmt_chain_13283); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            o_tree = (ANMLToken)adaptor.create(o);
                            adaptor.addChild(root_0, o_tree);
                            }

                            }
                            break;
                        case 2 :
                            // ANML.g:590:25: o= SetAssign
                            {
                            o=(ANMLToken)match(input,SetAssign,FOLLOW_SetAssign_in_stmt_chain_13287); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            o_tree = (ANMLToken)adaptor.create(o);
                            adaptor.addChild(root_0, o_tree);
                            }

                            }
                            break;

                    }

                    pushFollow(FOLLOW_set_in_stmt_chain_13293);
                    s=set();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());

                    }
                    break;
                case 8 :
                    // ANML.g:591:7: ( Comma )? i= num_relop b= e_num
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:591:12: ( Comma )?
                    int alt61=2;
                    int LA61_0 = input.LA(1);

                    if ( (LA61_0==Comma) ) {
                        alt61=1;
                    }
                    switch (alt61) {
                        case 1 :
                            // ANML.g:591:12: Comma
                            {
                            Comma174=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13301); if (state.failed) return retval;

                            }
                            break;

                    }

                    pushFollow(FOLLOW_num_relop_in_stmt_chain_13307);
                    i=num_relop();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) root_0 = (ANMLToken)adaptor.becomeRoot(i.getTree(), root_0);
                    pushFollow(FOLLOW_e_num_in_stmt_chain_13312);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, b.getTree());

                    }
                    break;
                case 9 :
                    // ANML.g:592:4: ( Comma )? (o= Equal Skip | o= Skip )
                    {
                    // ANML.g:592:4: ( Comma )?
                    int alt62=2;
                    int LA62_0 = input.LA(1);

                    if ( (LA62_0==Comma) ) {
                        alt62=1;
                    }
                    switch (alt62) {
                        case 1 :
                            // ANML.g:592:4: Comma
                            {
                            Comma175=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13318); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma175);


                            }
                            break;

                    }

                    // ANML.g:592:11: (o= Equal Skip | o= Skip )
                    int alt63=2;
                    int LA63_0 = input.LA(1);

                    if ( (LA63_0==Equal) ) {
                        alt63=1;
                    }
                    else if ( (LA63_0==Skip) ) {
                        alt63=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 63, 0, input);

                        throw nvae;
                    }
                    switch (alt63) {
                        case 1 :
                            // ANML.g:592:12: o= Equal Skip
                            {
                            o=(ANMLToken)match(input,Equal,FOLLOW_Equal_in_stmt_chain_13324); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Equal.add(o);

                            Skip176=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_stmt_chain_13326); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(Skip176);


                            }
                            break;
                        case 2 :
                            // ANML.g:592:27: o= Skip
                            {
                            o=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_stmt_chain_13332); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(o);


                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: Skip
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 593:3: -> Skip
                    {
                        adaptor.addChild(root_0, stream_Skip.nextNode());

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 10 :
                    // ANML.g:594:7: ( Comma )? (o= Assign Undefined | o= Undefine )
                    {
                    // ANML.g:594:7: ( Comma )?
                    int alt64=2;
                    int LA64_0 = input.LA(1);

                    if ( (LA64_0==Comma) ) {
                        alt64=1;
                    }
                    switch (alt64) {
                        case 1 :
                            // ANML.g:594:7: Comma
                            {
                            Comma177=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_chain_13347); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma177);


                            }
                            break;

                    }

                    // ANML.g:594:14: (o= Assign Undefined | o= Undefine )
                    int alt65=2;
                    int LA65_0 = input.LA(1);

                    if ( (LA65_0==Assign) ) {
                        alt65=1;
                    }
                    else if ( (LA65_0==Undefine) ) {
                        alt65=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 65, 0, input);

                        throw nvae;
                    }
                    switch (alt65) {
                        case 1 :
                            // ANML.g:594:15: o= Assign Undefined
                            {
                            o=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_stmt_chain_13353); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Assign.add(o);

                            Undefined178=(ANMLToken)match(input,Undefined,FOLLOW_Undefined_in_stmt_chain_13355); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Undefined.add(Undefined178);


                            }
                            break;
                        case 2 :
                            // ANML.g:594:36: o= Undefine
                            {
                            o=(ANMLToken)match(input,Undefine,FOLLOW_Undefine_in_stmt_chain_13361); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Undefine.add(o);


                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: Undefine
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 595:6: -> Undefine
                    {
                        adaptor.addChild(root_0, stream_Undefine.nextNode());

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_chain_1"

    public static class stmt_delta_chain_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_delta_chain"
    // ANML.g:598:1: stmt_delta_chain : ( Delta ref (e+= stmt_delta_chain_1 )+ -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ^( Delta ref ) ( $e)+ ) | ( interval ref ( stmt_delta_chain_1 )+ )=> interval ref (e+= stmt_delta_chain_1 )+ -> ^( Chain interval ^( Delta ref ) ( $e)+ ) );
    public final ANMLParser.stmt_delta_chain_return stmt_delta_chain() throws RecognitionException {
        ANMLParser.stmt_delta_chain_return retval = new ANMLParser.stmt_delta_chain_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Delta179=null;
        List list_e=null;
        ANMLParser.ref_return ref180 = null;

        ANMLParser.interval_return interval181 = null;

        ANMLParser.ref_return ref182 = null;

        RuleReturnScope e = null;
        ANMLToken Delta179_tree=null;
        RewriteRuleTokenStream stream_Delta=new RewriteRuleTokenStream(adaptor,"token Delta");
        RewriteRuleSubtreeStream stream_ref=new RewriteRuleSubtreeStream(adaptor,"rule ref");
        RewriteRuleSubtreeStream stream_interval=new RewriteRuleSubtreeStream(adaptor,"rule interval");
        RewriteRuleSubtreeStream stream_stmt_delta_chain_1=new RewriteRuleSubtreeStream(adaptor,"rule stmt_delta_chain_1");
        try {
            // ANML.g:599:2: ( Delta ref (e+= stmt_delta_chain_1 )+ -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ^( Delta ref ) ( $e)+ ) | ( interval ref ( stmt_delta_chain_1 )+ )=> interval ref (e+= stmt_delta_chain_1 )+ -> ^( Chain interval ^( Delta ref ) ( $e)+ ) )
            int alt69=2;
            int LA69_0 = input.LA(1);

            if ( (LA69_0==Delta) ) {
                alt69=1;
            }
            else if ( (LA69_0==LeftB) && (synpred13_ANML())) {
                alt69=2;
            }
            else if ( (LA69_0==LeftP) && (synpred13_ANML())) {
                alt69=2;
            }
            else if ( (LA69_0==Dots) && (synpred13_ANML())) {
                alt69=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 69, 0, input);

                throw nvae;
            }
            switch (alt69) {
                case 1 :
                    // ANML.g:599:4: Delta ref (e+= stmt_delta_chain_1 )+
                    {
                    Delta179=(ANMLToken)match(input,Delta,FOLLOW_Delta_in_stmt_delta_chain3383); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Delta.add(Delta179);

                    pushFollow(FOLLOW_ref_in_stmt_delta_chain3385);
                    ref180=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref180.getTree());
                    // ANML.g:599:15: (e+= stmt_delta_chain_1 )+
                    int cnt67=0;
                    loop67:
                    do {
                        int alt67=2;
                        int LA67_0 = input.LA(1);

                        if ( (LA67_0==Assign||LA67_0==Comma||LA67_0==Undefine||LA67_0==Equal||LA67_0==Change||(LA67_0>=SetAssign && LA67_0<=Skip)) ) {
                            alt67=1;
                        }


                        switch (alt67) {
                    	case 1 :
                    	    // ANML.g:599:15: e+= stmt_delta_chain_1
                    	    {
                    	    pushFollow(FOLLOW_stmt_delta_chain_1_in_stmt_delta_chain3389);
                    	    e=stmt_delta_chain_1();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_stmt_delta_chain_1.add(e.getTree());
                    	    if (list_e==null) list_e=new ArrayList();
                    	    list_e.add(e.getTree());


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt67 >= 1 ) break loop67;
                    	    if (state.backtracking>0) {state.failed=true; return retval;}
                                EarlyExitException eee =
                                    new EarlyExitException(67, input);
                                throw eee;
                        }
                        cnt67++;
                    } while (true);



                    // AST REWRITE
                    // elements: e, Delta, ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: e
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",list_e);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 600:5: -> ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ^( Delta ref ) ( $e)+ )
                    {
                        // ANML.g:600:8: ^( Chain ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) ) ^( Delta ref ) ( $e)+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Chain, "Chain"), root_1);

                        // ANML.g:600:16: ^( DefiniteInterval ^( TBra Bra ) ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ^( TKet Ket ) )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_2);

                        // ANML.g:600:35: ^( TBra Bra )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TBra, "TBra"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Bra, "Bra"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:600:47: ^( TStart Start )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:600:63: ^( TDuration Duration )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Duration, "Duration"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:600:85: ^( TEnd End )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(End, "End"));

                        adaptor.addChild(root_2, root_3);
                        }
                        // ANML.g:600:97: ^( TKet Ket )
                        {
                        ANMLToken root_3 = (ANMLToken)adaptor.nil();
                        root_3 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TKet, "TKet"), root_3);

                        adaptor.addChild(root_3, (ANMLToken)adaptor.create(Ket, "Ket"));

                        adaptor.addChild(root_2, root_3);
                        }

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:600:110: ^( Delta ref )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot(stream_Delta.nextNode(), root_2);

                        adaptor.addChild(root_2, stream_ref.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }
                        if ( !(stream_e.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_e.hasNext() ) {
                            adaptor.addChild(root_1, stream_e.nextTree());

                        }
                        stream_e.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:601:4: ( interval ref ( stmt_delta_chain_1 )+ )=> interval ref (e+= stmt_delta_chain_1 )+
                    {
                    pushFollow(FOLLOW_interval_in_stmt_delta_chain3461);
                    interval181=interval();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_interval.add(interval181.getTree());
                    pushFollow(FOLLOW_ref_in_stmt_delta_chain3463);
                    ref182=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ref.add(ref182.getTree());
                    // ANML.g:601:55: (e+= stmt_delta_chain_1 )+
                    int cnt68=0;
                    loop68:
                    do {
                        int alt68=2;
                        int LA68_0 = input.LA(1);

                        if ( (LA68_0==Assign||LA68_0==Comma||LA68_0==Undefine||LA68_0==Equal||LA68_0==Change||(LA68_0>=SetAssign && LA68_0<=Skip)) ) {
                            alt68=1;
                        }


                        switch (alt68) {
                    	case 1 :
                    	    // ANML.g:601:55: e+= stmt_delta_chain_1
                    	    {
                    	    pushFollow(FOLLOW_stmt_delta_chain_1_in_stmt_delta_chain3467);
                    	    e=stmt_delta_chain_1();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_stmt_delta_chain_1.add(e.getTree());
                    	    if (list_e==null) list_e=new ArrayList();
                    	    list_e.add(e.getTree());


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt68 >= 1 ) break loop68;
                    	    if (state.backtracking>0) {state.failed=true; return retval;}
                                EarlyExitException eee =
                                    new EarlyExitException(68, input);
                                throw eee;
                        }
                        cnt68++;
                    } while (true);



                    // AST REWRITE
                    // elements: interval, e, ref
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: e
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",list_e);
                    root_0 = (ANMLToken)adaptor.nil();
                    // 602:3: -> ^( Chain interval ^( Delta ref ) ( $e)+ )
                    {
                        // ANML.g:602:6: ^( Chain interval ^( Delta ref ) ( $e)+ )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Chain, "Chain"), root_1);

                        adaptor.addChild(root_1, stream_interval.nextTree());
                        // ANML.g:602:23: ^( Delta ref )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Delta, "Delta"), root_2);

                        adaptor.addChild(root_2, stream_ref.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }
                        if ( !(stream_e.hasNext()) ) {
                            throw new RewriteEarlyExitException();
                        }
                        while ( stream_e.hasNext() ) {
                            adaptor.addChild(root_1, stream_e.nextTree());

                        }
                        stream_e.reset();

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_delta_chain"

    public static class stmt_delta_chain_1_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_delta_chain_1"
    // ANML.g:606:1: stmt_delta_chain_1 : ( ( Comma )? Assign b= e_num | ( Comma )? o= Change b= e_num -> Undefine ^( Assign $b) | ( Comma )? SetAssign s= set | ( Comma )? (o= Equal Skip | o= Skip ) -> Skip | ( Comma )? (o= Assign Undefined | o= Undefine ) -> Undefine );
    public final ANMLParser.stmt_delta_chain_1_return stmt_delta_chain_1() throws RecognitionException {
        ANMLParser.stmt_delta_chain_1_return retval = new ANMLParser.stmt_delta_chain_1_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken o=null;
        ANMLToken Comma183=null;
        ANMLToken Assign184=null;
        ANMLToken Comma185=null;
        ANMLToken Comma186=null;
        ANMLToken SetAssign187=null;
        ANMLToken Comma188=null;
        ANMLToken Skip189=null;
        ANMLToken Comma190=null;
        ANMLToken Undefined191=null;
        ANMLParser.e_num_return b = null;

        ANMLParser.set_return s = null;


        ANMLToken o_tree=null;
        ANMLToken Comma183_tree=null;
        ANMLToken Assign184_tree=null;
        ANMLToken Comma185_tree=null;
        ANMLToken Comma186_tree=null;
        ANMLToken SetAssign187_tree=null;
        ANMLToken Comma188_tree=null;
        ANMLToken Skip189_tree=null;
        ANMLToken Comma190_tree=null;
        ANMLToken Undefined191_tree=null;
        RewriteRuleTokenStream stream_Skip=new RewriteRuleTokenStream(adaptor,"token Skip");
        RewriteRuleTokenStream stream_Assign=new RewriteRuleTokenStream(adaptor,"token Assign");
        RewriteRuleTokenStream stream_Undefine=new RewriteRuleTokenStream(adaptor,"token Undefine");
        RewriteRuleTokenStream stream_Change=new RewriteRuleTokenStream(adaptor,"token Change");
        RewriteRuleTokenStream stream_Equal=new RewriteRuleTokenStream(adaptor,"token Equal");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleTokenStream stream_Undefined=new RewriteRuleTokenStream(adaptor,"token Undefined");
        RewriteRuleSubtreeStream stream_e_num=new RewriteRuleSubtreeStream(adaptor,"rule e_num");
        try {
            // ANML.g:607:5: ( ( Comma )? Assign b= e_num | ( Comma )? o= Change b= e_num -> Undefine ^( Assign $b) | ( Comma )? SetAssign s= set | ( Comma )? (o= Equal Skip | o= Skip ) -> Skip | ( Comma )? (o= Assign Undefined | o= Undefine ) -> Undefine )
            int alt77=5;
            switch ( input.LA(1) ) {
            case Comma:
                {
                switch ( input.LA(2) ) {
                case SetAssign:
                    {
                    alt77=3;
                    }
                    break;
                case Assign:
                    {
                    int LA77_2 = input.LA(3);

                    if ( (LA77_2==Undefined) ) {
                        alt77=5;
                    }
                    else if ( ((LA77_2>=Bra && LA77_2<=Ket)||LA77_2==ID||LA77_2==LeftP||LA77_2==NotBit||(LA77_2>=LeftB && LA77_2<=Duration)||LA77_2==Contains||(LA77_2>=ForAll && LA77_2<=Exists)||LA77_2==Dots||LA77_2==Minus||(LA77_2>=Unordered && LA77_2<=Ordered)||(LA77_2>=Start && LA77_2<=Infinity)) ) {
                        alt77=1;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 77, 2, input);

                        throw nvae;
                    }
                    }
                    break;
                case Undefine:
                    {
                    alt77=5;
                    }
                    break;
                case Equal:
                case Skip:
                    {
                    alt77=4;
                    }
                    break;
                case Change:
                    {
                    alt77=2;
                    }
                    break;
                default:
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 77, 1, input);

                    throw nvae;
                }

                }
                break;
            case Assign:
                {
                int LA77_2 = input.LA(2);

                if ( (LA77_2==Undefined) ) {
                    alt77=5;
                }
                else if ( ((LA77_2>=Bra && LA77_2<=Ket)||LA77_2==ID||LA77_2==LeftP||LA77_2==NotBit||(LA77_2>=LeftB && LA77_2<=Duration)||LA77_2==Contains||(LA77_2>=ForAll && LA77_2<=Exists)||LA77_2==Dots||LA77_2==Minus||(LA77_2>=Unordered && LA77_2<=Ordered)||(LA77_2>=Start && LA77_2<=Infinity)) ) {
                    alt77=1;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 77, 2, input);

                    throw nvae;
                }
                }
                break;
            case Change:
                {
                alt77=2;
                }
                break;
            case SetAssign:
                {
                alt77=3;
                }
                break;
            case Equal:
            case Skip:
                {
                alt77=4;
                }
                break;
            case Undefine:
                {
                alt77=5;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 77, 0, input);

                throw nvae;
            }

            switch (alt77) {
                case 1 :
                    // ANML.g:607:7: ( Comma )? Assign b= e_num
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:607:7: ( Comma )?
                    int alt70=2;
                    int LA70_0 = input.LA(1);

                    if ( (LA70_0==Comma) ) {
                        alt70=1;
                    }
                    switch (alt70) {
                        case 1 :
                            // ANML.g:607:7: Comma
                            {
                            Comma183=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_delta_chain_13502); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            Comma183_tree = (ANMLToken)adaptor.create(Comma183);
                            adaptor.addChild(root_0, Comma183_tree);
                            }

                            }
                            break;

                    }

                    Assign184=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_stmt_delta_chain_13505); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    Assign184_tree = (ANMLToken)adaptor.create(Assign184);
                    root_0 = (ANMLToken)adaptor.becomeRoot(Assign184_tree, root_0);
                    }
                    pushFollow(FOLLOW_e_num_in_stmt_delta_chain_13510);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, b.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:608:7: ( Comma )? o= Change b= e_num
                    {
                    // ANML.g:608:7: ( Comma )?
                    int alt71=2;
                    int LA71_0 = input.LA(1);

                    if ( (LA71_0==Comma) ) {
                        alt71=1;
                    }
                    switch (alt71) {
                        case 1 :
                            // ANML.g:608:7: Comma
                            {
                            Comma185=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_delta_chain_13518); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma185);


                            }
                            break;

                    }

                    o=(ANMLToken)match(input,Change,FOLLOW_Change_in_stmt_delta_chain_13523); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Change.add(o);

                    pushFollow(FOLLOW_e_num_in_stmt_delta_chain_13527);
                    b=e_num();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_e_num.add(b.getTree());


                    // AST REWRITE
                    // elements: b
                    // token labels: 
                    // rule labels: retval, b
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"token b",b!=null?b.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 609:6: -> Undefine ^( Assign $b)
                    {
                        adaptor.addChild(root_0, (ANMLToken)adaptor.create(Undefine, "Undefine"));
                        // ANML.g:610:7: ^( Assign $b)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Assign, "Assign"), root_1);

                        adaptor.addChild(root_1, stream_b.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:611:7: ( Comma )? SetAssign s= set
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:611:7: ( Comma )?
                    int alt72=2;
                    int LA72_0 = input.LA(1);

                    if ( (LA72_0==Comma) ) {
                        alt72=1;
                    }
                    switch (alt72) {
                        case 1 :
                            // ANML.g:611:7: Comma
                            {
                            Comma186=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_delta_chain_13557); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            Comma186_tree = (ANMLToken)adaptor.create(Comma186);
                            adaptor.addChild(root_0, Comma186_tree);
                            }

                            }
                            break;

                    }

                    SetAssign187=(ANMLToken)match(input,SetAssign,FOLLOW_SetAssign_in_stmt_delta_chain_13560); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    SetAssign187_tree = (ANMLToken)adaptor.create(SetAssign187);
                    root_0 = (ANMLToken)adaptor.becomeRoot(SetAssign187_tree, root_0);
                    }
                    pushFollow(FOLLOW_set_in_stmt_delta_chain_13565);
                    s=set();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());

                    }
                    break;
                case 4 :
                    // ANML.g:612:4: ( Comma )? (o= Equal Skip | o= Skip )
                    {
                    // ANML.g:612:4: ( Comma )?
                    int alt73=2;
                    int LA73_0 = input.LA(1);

                    if ( (LA73_0==Comma) ) {
                        alt73=1;
                    }
                    switch (alt73) {
                        case 1 :
                            // ANML.g:612:4: Comma
                            {
                            Comma188=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_delta_chain_13570); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma188);


                            }
                            break;

                    }

                    // ANML.g:612:11: (o= Equal Skip | o= Skip )
                    int alt74=2;
                    int LA74_0 = input.LA(1);

                    if ( (LA74_0==Equal) ) {
                        alt74=1;
                    }
                    else if ( (LA74_0==Skip) ) {
                        alt74=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 74, 0, input);

                        throw nvae;
                    }
                    switch (alt74) {
                        case 1 :
                            // ANML.g:612:12: o= Equal Skip
                            {
                            o=(ANMLToken)match(input,Equal,FOLLOW_Equal_in_stmt_delta_chain_13576); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Equal.add(o);

                            Skip189=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_stmt_delta_chain_13578); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(Skip189);


                            }
                            break;
                        case 2 :
                            // ANML.g:612:27: o= Skip
                            {
                            o=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_stmt_delta_chain_13584); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(o);


                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: Skip
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 613:3: -> Skip
                    {
                        adaptor.addChild(root_0, stream_Skip.nextNode());

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 5 :
                    // ANML.g:614:7: ( Comma )? (o= Assign Undefined | o= Undefine )
                    {
                    // ANML.g:614:7: ( Comma )?
                    int alt75=2;
                    int LA75_0 = input.LA(1);

                    if ( (LA75_0==Comma) ) {
                        alt75=1;
                    }
                    switch (alt75) {
                        case 1 :
                            // ANML.g:614:7: Comma
                            {
                            Comma190=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_stmt_delta_chain_13599); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma190);


                            }
                            break;

                    }

                    // ANML.g:614:14: (o= Assign Undefined | o= Undefine )
                    int alt76=2;
                    int LA76_0 = input.LA(1);

                    if ( (LA76_0==Assign) ) {
                        alt76=1;
                    }
                    else if ( (LA76_0==Undefine) ) {
                        alt76=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 76, 0, input);

                        throw nvae;
                    }
                    switch (alt76) {
                        case 1 :
                            // ANML.g:614:15: o= Assign Undefined
                            {
                            o=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_stmt_delta_chain_13605); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Assign.add(o);

                            Undefined191=(ANMLToken)match(input,Undefined,FOLLOW_Undefined_in_stmt_delta_chain_13607); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Undefined.add(Undefined191);


                            }
                            break;
                        case 2 :
                            // ANML.g:614:36: o= Undefine
                            {
                            o=(ANMLToken)match(input,Undefine,FOLLOW_Undefine_in_stmt_delta_chain_13613); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Undefine.add(o);


                            }
                            break;

                    }



                    // AST REWRITE
                    // elements: Undefine
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 615:6: -> Undefine
                    {
                        adaptor.addChild(root_0, stream_Undefine.nextNode());

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_delta_chain_1"

    public static class stmt_timeless_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "stmt_timeless"
    // ANML.g:618:1: stmt_timeless : time_primitive Assign expr ;
    public final ANMLParser.stmt_timeless_return stmt_timeless() throws RecognitionException {
        ANMLParser.stmt_timeless_return retval = new ANMLParser.stmt_timeless_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Assign193=null;
        ANMLParser.time_primitive_return time_primitive192 = null;

        ANMLParser.expr_return expr194 = null;


        ANMLToken Assign193_tree=null;

        try {
            // ANML.g:619:2: ( time_primitive Assign expr )
            // ANML.g:619:4: time_primitive Assign expr
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_time_primitive_in_stmt_timeless3634);
            time_primitive192=time_primitive();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, time_primitive192.getTree());
            Assign193=(ANMLToken)match(input,Assign,FOLLOW_Assign_in_stmt_timeless3636); if (state.failed) return retval;
            if ( state.backtracking==0 ) {
            Assign193_tree = (ANMLToken)adaptor.create(Assign193);
            root_0 = (ANMLToken)adaptor.becomeRoot(Assign193_tree, root_0);
            }
            pushFollow(FOLLOW_expr_in_stmt_timeless3639);
            expr194=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, expr194.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "stmt_timeless"

    public static class guard_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "guard"
    // ANML.g:622:1: guard : expr ;
    public final ANMLParser.guard_return guard() throws RecognitionException {
        ANMLParser.guard_return retval = new ANMLParser.guard_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.expr_return expr195 = null;



        try {
            // ANML.g:624:2: ( expr )
            // ANML.g:624:4: expr
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_expr_in_guard3652);
            expr195=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, expr195.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "guard"

    public static class interval_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "interval"
    // ANML.g:628:1: interval : ( ( univ_time )=> univ_time | ( exist_time )=> exist_time );
    public final ANMLParser.interval_return interval() throws RecognitionException {
        ANMLParser.interval_return retval = new ANMLParser.interval_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.univ_time_return univ_time196 = null;

        ANMLParser.exist_time_return exist_time197 = null;



        try {
            // ANML.g:629:2: ( ( univ_time )=> univ_time | ( exist_time )=> exist_time )
            int alt78=2;
            int LA78_0 = input.LA(1);

            if ( (LA78_0==LeftB) ) {
                int LA78_1 = input.LA(2);

                if ( (synpred14_ANML()) ) {
                    alt78=1;
                }
                else if ( (synpred15_ANML()) ) {
                    alt78=2;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 78, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA78_0==LeftP) ) {
                int LA78_2 = input.LA(2);

                if ( (synpred14_ANML()) ) {
                    alt78=1;
                }
                else if ( (synpred15_ANML()) ) {
                    alt78=2;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 78, 2, input);

                    throw nvae;
                }
            }
            else if ( (LA78_0==Dots) && (synpred15_ANML())) {
                alt78=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 78, 0, input);

                throw nvae;
            }
            switch (alt78) {
                case 1 :
                    // ANML.g:629:4: ( univ_time )=> univ_time
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_univ_time_in_interval3667);
                    univ_time196=univ_time();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, univ_time196.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:630:4: ( exist_time )=> exist_time
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_exist_time_in_interval3676);
                    exist_time197=exist_time();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, exist_time197.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "interval"

    public static class univ_time_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "univ_time"
    // ANML.g:637:1: univ_time : ( ( bra All ket )=> bra All ket -> ^( DefiniteInterval bra ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ket ) | ( LeftB expr RightB )=> LeftB e= expr RightB -> ^( DefinitePoint ^( TStart $e) ) | bra (d= delta_time Comma e= expr ket -> ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket ) | e= expr Comma (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) ) ) );
    public final ANMLParser.univ_time_return univ_time() throws RecognitionException {
        ANMLParser.univ_time_return retval = new ANMLParser.univ_time_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken All199=null;
        ANMLToken LeftB201=null;
        ANMLToken RightB202=null;
        ANMLToken Comma204=null;
        ANMLToken Comma206=null;
        ANMLParser.expr_return e = null;

        ANMLParser.delta_time_return d = null;

        ANMLParser.expr_return f = null;

        ANMLParser.bra_return bra198 = null;

        ANMLParser.ket_return ket200 = null;

        ANMLParser.bra_return bra203 = null;

        ANMLParser.ket_return ket205 = null;

        ANMLParser.ket_return ket207 = null;

        ANMLParser.ket_return ket208 = null;


        ANMLToken All199_tree=null;
        ANMLToken LeftB201_tree=null;
        ANMLToken RightB202_tree=null;
        ANMLToken Comma204_tree=null;
        ANMLToken Comma206_tree=null;
        RewriteRuleTokenStream stream_RightB=new RewriteRuleTokenStream(adaptor,"token RightB");
        RewriteRuleTokenStream stream_LeftB=new RewriteRuleTokenStream(adaptor,"token LeftB");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleTokenStream stream_All=new RewriteRuleTokenStream(adaptor,"token All");
        RewriteRuleSubtreeStream stream_delta_time=new RewriteRuleSubtreeStream(adaptor,"rule delta_time");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        RewriteRuleSubtreeStream stream_bra=new RewriteRuleSubtreeStream(adaptor,"rule bra");
        RewriteRuleSubtreeStream stream_ket=new RewriteRuleSubtreeStream(adaptor,"rule ket");
        try {
            // ANML.g:639:2: ( ( bra All ket )=> bra All ket -> ^( DefiniteInterval bra ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ket ) | ( LeftB expr RightB )=> LeftB e= expr RightB -> ^( DefinitePoint ^( TStart $e) ) | bra (d= delta_time Comma e= expr ket -> ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket ) | e= expr Comma (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) ) ) )
            int alt81=3;
            int LA81_0 = input.LA(1);

            if ( (LA81_0==LeftB) ) {
                int LA81_1 = input.LA(2);

                if ( (synpred16_ANML()) ) {
                    alt81=1;
                }
                else if ( (synpred17_ANML()) ) {
                    alt81=2;
                }
                else if ( (true) ) {
                    alt81=3;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 81, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA81_0==LeftP) ) {
                int LA81_2 = input.LA(2);

                if ( (synpred16_ANML()) ) {
                    alt81=1;
                }
                else if ( (true) ) {
                    alt81=3;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 81, 2, input);

                    throw nvae;
                }
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 81, 0, input);

                throw nvae;
            }
            switch (alt81) {
                case 1 :
                    // ANML.g:639:4: ( bra All ket )=> bra All ket
                    {
                    pushFollow(FOLLOW_bra_in_univ_time3702);
                    bra198=bra();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_bra.add(bra198.getTree());
                    All199=(ANMLToken)match(input,All,FOLLOW_All_in_univ_time3704); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_All.add(All199);

                    pushFollow(FOLLOW_ket_in_univ_time3706);
                    ket200=ket();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ket.add(ket200.getTree());


                    // AST REWRITE
                    // elements: bra, ket
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 640:6: -> ^( DefiniteInterval bra ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ket )
                    {
                        // ANML.g:640:9: ^( DefiniteInterval bra ^( TStart Start ) ^( TDuration Duration ) ^( TEnd End ) ket )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_1);

                        adaptor.addChild(root_1, stream_bra.nextTree());
                        // ANML.g:640:32: ^( TStart Start )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                        adaptor.addChild(root_2, (ANMLToken)adaptor.create(Start, "Start"));

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:640:48: ^( TDuration Duration )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_2);

                        adaptor.addChild(root_2, (ANMLToken)adaptor.create(Duration, "Duration"));

                        adaptor.addChild(root_1, root_2);
                        }
                        // ANML.g:640:70: ^( TEnd End )
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_2);

                        adaptor.addChild(root_2, (ANMLToken)adaptor.create(End, "End"));

                        adaptor.addChild(root_1, root_2);
                        }
                        adaptor.addChild(root_1, stream_ket.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:641:4: ( LeftB expr RightB )=> LeftB e= expr RightB
                    {
                    LeftB201=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_univ_time3754); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftB.add(LeftB201);

                    pushFollow(FOLLOW_expr_in_univ_time3758);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                    RightB202=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_univ_time3760); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightB.add(RightB202);



                    // AST REWRITE
                    // elements: e
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 642:4: -> ^( DefinitePoint ^( TStart $e) )
                    {
                        // ANML.g:642:7: ^( DefinitePoint ^( TStart $e) )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefinitePoint, "DefinitePoint"), root_1);

                        // ANML.g:642:23: ^( TStart $e)
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                        adaptor.addChild(root_2, stream_e.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:643:4: bra (d= delta_time Comma e= expr ket -> ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket ) | e= expr Comma (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) ) )
                    {
                    pushFollow(FOLLOW_bra_in_univ_time3782);
                    bra203=bra();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_bra.add(bra203.getTree());
                    // ANML.g:644:4: (d= delta_time Comma e= expr ket -> ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket ) | e= expr Comma (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) ) )
                    int alt80=2;
                    int LA80_0 = input.LA(1);

                    if ( (LA80_0==Delta) ) {
                        alt80=1;
                    }
                    else if ( ((LA80_0>=Bra && LA80_0<=Ket)||LA80_0==ID||LA80_0==LeftP||(LA80_0>=NotLog && LA80_0<=NotBit)||(LA80_0>=LeftB && LA80_0<=Duration)||LA80_0==Contains||(LA80_0>=ForAll && LA80_0<=Exists)||LA80_0==Dots||LA80_0==Minus||(LA80_0>=Unordered && LA80_0<=Ordered)||(LA80_0>=Start && LA80_0<=Infinity)) ) {
                        alt80=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 80, 0, input);

                        throw nvae;
                    }
                    switch (alt80) {
                        case 1 :
                            // ANML.g:644:6: d= delta_time Comma e= expr ket
                            {
                            pushFollow(FOLLOW_delta_time_in_univ_time3792);
                            d=delta_time();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_delta_time.add(d.getTree());
                            Comma204=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_univ_time3794); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma204);

                            pushFollow(FOLLOW_expr_in_univ_time3798);
                            e=expr();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                            pushFollow(FOLLOW_ket_in_univ_time3800);
                            ket205=ket();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_ket.add(ket205.getTree());


                            // AST REWRITE
                            // elements: d, ket, bra, e
                            // token labels: 
                            // rule labels: retval, d, e
                            // token list labels: 
                            // rule list labels: 
                            if ( state.backtracking==0 ) {
                            retval.tree = root_0;
                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                            RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",d!=null?d.tree:null);
                            RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                            root_0 = (ANMLToken)adaptor.nil();
                            // 645:3: -> ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket )
                            {
                                // ANML.g:645:6: ^( DefiniteInterval bra ^( TDuration $d) ^( TEnd $e) ket )
                                {
                                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_1);

                                adaptor.addChild(root_1, stream_bra.nextTree());
                                // ANML.g:645:29: ^( TDuration $d)
                                {
                                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_2);

                                adaptor.addChild(root_2, stream_d.nextTree());

                                adaptor.addChild(root_1, root_2);
                                }
                                // ANML.g:645:45: ^( TEnd $e)
                                {
                                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_2);

                                adaptor.addChild(root_2, stream_e.nextTree());

                                adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_1, stream_ket.nextTree());

                                adaptor.addChild(root_0, root_1);
                                }

                            }

                            retval.tree = root_0;}
                            }
                            break;
                        case 2 :
                            // ANML.g:646:6: e= expr Comma (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) )
                            {
                            pushFollow(FOLLOW_expr_in_univ_time3835);
                            e=expr();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                            Comma206=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_univ_time3837); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma206);

                            // ANML.g:647:3: (d= delta_time ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket ) | f= expr ket -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket ) )
                            int alt79=2;
                            int LA79_0 = input.LA(1);

                            if ( (LA79_0==Delta) ) {
                                alt79=1;
                            }
                            else if ( ((LA79_0>=Bra && LA79_0<=Ket)||LA79_0==ID||LA79_0==LeftP||(LA79_0>=NotLog && LA79_0<=NotBit)||(LA79_0>=LeftB && LA79_0<=Duration)||LA79_0==Contains||(LA79_0>=ForAll && LA79_0<=Exists)||LA79_0==Dots||LA79_0==Minus||(LA79_0>=Unordered && LA79_0<=Ordered)||(LA79_0>=Start && LA79_0<=Infinity)) ) {
                                alt79=2;
                            }
                            else {
                                if (state.backtracking>0) {state.failed=true; return retval;}
                                NoViableAltException nvae =
                                    new NoViableAltException("", 79, 0, input);

                                throw nvae;
                            }
                            switch (alt79) {
                                case 1 :
                                    // ANML.g:647:5: d= delta_time ket
                                    {
                                    pushFollow(FOLLOW_delta_time_in_univ_time3846);
                                    d=delta_time();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_delta_time.add(d.getTree());
                                    pushFollow(FOLLOW_ket_in_univ_time3848);
                                    ket207=ket();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_ket.add(ket207.getTree());


                                    // AST REWRITE
                                    // elements: ket, d, e, bra
                                    // token labels: 
                                    // rule labels: retval, d, e
                                    // token list labels: 
                                    // rule list labels: 
                                    if ( state.backtracking==0 ) {
                                    retval.tree = root_0;
                                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                                    RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",d!=null?d.tree:null);
                                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                                    root_0 = (ANMLToken)adaptor.nil();
                                    // 648:5: -> ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket )
                                    {
                                        // ANML.g:648:8: ^( DefiniteInterval bra ^( TStart $e) ^( TDuration $d) ket )
                                        {
                                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_1);

                                        adaptor.addChild(root_1, stream_bra.nextTree());
                                        // ANML.g:648:31: ^( TStart $e)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                                        adaptor.addChild(root_2, stream_e.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        // ANML.g:648:44: ^( TDuration $d)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_2);

                                        adaptor.addChild(root_2, stream_d.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        adaptor.addChild(root_1, stream_ket.nextTree());

                                        adaptor.addChild(root_0, root_1);
                                        }

                                    }

                                    retval.tree = root_0;}
                                    }
                                    break;
                                case 2 :
                                    // ANML.g:649:5: f= expr ket
                                    {
                                    pushFollow(FOLLOW_expr_in_univ_time3884);
                                    f=expr();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_expr.add(f.getTree());
                                    pushFollow(FOLLOW_ket_in_univ_time3886);
                                    ket208=ket();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_ket.add(ket208.getTree());


                                    // AST REWRITE
                                    // elements: f, e, ket, bra
                                    // token labels: 
                                    // rule labels: f, retval, e
                                    // token list labels: 
                                    // rule list labels: 
                                    if ( state.backtracking==0 ) {
                                    retval.tree = root_0;
                                    RewriteRuleSubtreeStream stream_f=new RewriteRuleSubtreeStream(adaptor,"token f",f!=null?f.tree:null);
                                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                                    root_0 = (ANMLToken)adaptor.nil();
                                    // 650:5: -> ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket )
                                    {
                                        // ANML.g:650:8: ^( DefiniteInterval bra ^( TStart $e) ^( TEnd $f) ket )
                                        {
                                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(DefiniteInterval, "DefiniteInterval"), root_1);

                                        adaptor.addChild(root_1, stream_bra.nextTree());
                                        // ANML.g:650:31: ^( TStart $e)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                                        adaptor.addChild(root_2, stream_e.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        // ANML.g:650:44: ^( TEnd $f)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_2);

                                        adaptor.addChild(root_2, stream_f.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        adaptor.addChild(root_1, stream_ket.nextTree());

                                        adaptor.addChild(root_0, root_1);
                                        }

                                    }

                                    retval.tree = root_0;}
                                    }
                                    break;

                            }


                            }
                            break;

                    }


                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "univ_time"

    public static class exist_time_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "exist_time"
    // ANML.g:655:1: exist_time : ( ( LeftB Skip RightB )=> LeftB Skip RightB -> ^( IndefinitePoint ) | ( bra expr rLimit )=> bra e= expr rLimit -> ^( IndefiniteInterval bra ^( TStart $e) rLimit ) | ( lLimit expr ket )=> lLimit e= expr ket -> ^( IndefiniteInterval lLimit ^( TEnd $e) ket ) | bra ( ( Delta )=>d= delta_time Comma ( Skip )? ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip Comma ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) ) | e= expr Comma Skip ket -> ^( IndefiniteInterval bra ^( TStart $e) ket ) ) );
    public final ANMLParser.exist_time_return exist_time() throws RecognitionException {
        ANMLParser.exist_time_return retval = new ANMLParser.exist_time_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftB209=null;
        ANMLToken Skip210=null;
        ANMLToken RightB211=null;
        ANMLToken Comma217=null;
        ANMLToken Skip218=null;
        ANMLToken Skip220=null;
        ANMLToken Comma221=null;
        ANMLToken Skip223=null;
        ANMLToken Comma226=null;
        ANMLToken Skip227=null;
        ANMLParser.expr_return e = null;

        ANMLParser.delta_time_return d = null;

        ANMLParser.bra_return bra212 = null;

        ANMLParser.rLimit_return rLimit213 = null;

        ANMLParser.lLimit_return lLimit214 = null;

        ANMLParser.ket_return ket215 = null;

        ANMLParser.bra_return bra216 = null;

        ANMLParser.ket_return ket219 = null;

        ANMLParser.ket_return ket222 = null;

        ANMLParser.ket_return ket224 = null;

        ANMLParser.ket_return ket225 = null;

        ANMLParser.ket_return ket228 = null;


        ANMLToken LeftB209_tree=null;
        ANMLToken Skip210_tree=null;
        ANMLToken RightB211_tree=null;
        ANMLToken Comma217_tree=null;
        ANMLToken Skip218_tree=null;
        ANMLToken Skip220_tree=null;
        ANMLToken Comma221_tree=null;
        ANMLToken Skip223_tree=null;
        ANMLToken Comma226_tree=null;
        ANMLToken Skip227_tree=null;
        RewriteRuleTokenStream stream_Skip=new RewriteRuleTokenStream(adaptor,"token Skip");
        RewriteRuleTokenStream stream_RightB=new RewriteRuleTokenStream(adaptor,"token RightB");
        RewriteRuleTokenStream stream_LeftB=new RewriteRuleTokenStream(adaptor,"token LeftB");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_rLimit=new RewriteRuleSubtreeStream(adaptor,"rule rLimit");
        RewriteRuleSubtreeStream stream_delta_time=new RewriteRuleSubtreeStream(adaptor,"rule delta_time");
        RewriteRuleSubtreeStream stream_bra=new RewriteRuleSubtreeStream(adaptor,"rule bra");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        RewriteRuleSubtreeStream stream_ket=new RewriteRuleSubtreeStream(adaptor,"rule ket");
        RewriteRuleSubtreeStream stream_lLimit=new RewriteRuleSubtreeStream(adaptor,"rule lLimit");
        try {
            // ANML.g:657:2: ( ( LeftB Skip RightB )=> LeftB Skip RightB -> ^( IndefinitePoint ) | ( bra expr rLimit )=> bra e= expr rLimit -> ^( IndefiniteInterval bra ^( TStart $e) rLimit ) | ( lLimit expr ket )=> lLimit e= expr ket -> ^( IndefiniteInterval lLimit ^( TEnd $e) ket ) | bra ( ( Delta )=>d= delta_time Comma ( Skip )? ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip Comma ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) ) | e= expr Comma Skip ket -> ^( IndefiniteInterval bra ^( TStart $e) ket ) ) )
            int alt85=4;
            int LA85_0 = input.LA(1);

            if ( (LA85_0==LeftB) ) {
                int LA85_1 = input.LA(2);

                if ( (synpred18_ANML()) ) {
                    alt85=1;
                }
                else if ( (synpred19_ANML()) ) {
                    alt85=2;
                }
                else if ( (true) ) {
                    alt85=4;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 85, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA85_0==LeftP) ) {
                int LA85_2 = input.LA(2);

                if ( (synpred19_ANML()) ) {
                    alt85=2;
                }
                else if ( (true) ) {
                    alt85=4;
                }
                else {
                    if (state.backtracking>0) {state.failed=true; return retval;}
                    NoViableAltException nvae =
                        new NoViableAltException("", 85, 2, input);

                    throw nvae;
                }
            }
            else if ( (LA85_0==Dots) && (synpred20_ANML())) {
                alt85=3;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 85, 0, input);

                throw nvae;
            }
            switch (alt85) {
                case 1 :
                    // ANML.g:657:4: ( LeftB Skip RightB )=> LeftB Skip RightB
                    {
                    LeftB209=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_exist_time3945); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftB.add(LeftB209);

                    Skip210=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_exist_time3947); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Skip.add(Skip210);

                    RightB211=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_exist_time3949); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightB.add(RightB211);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 657:44: -> ^( IndefinitePoint )
                    {
                        // ANML.g:657:47: ^( IndefinitePoint )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefinitePoint, "IndefinitePoint"), root_1);

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:658:4: ( bra expr rLimit )=> bra e= expr rLimit
                    {
                    pushFollow(FOLLOW_bra_in_exist_time3969);
                    bra212=bra();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_bra.add(bra212.getTree());
                    pushFollow(FOLLOW_expr_in_exist_time3973);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                    pushFollow(FOLLOW_rLimit_in_exist_time3975);
                    rLimit213=rLimit();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_rLimit.add(rLimit213.getTree());


                    // AST REWRITE
                    // elements: bra, rLimit, e
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 658:42: -> ^( IndefiniteInterval bra ^( TStart $e) rLimit )
                    {
                        // ANML.g:658:45: ^( IndefiniteInterval bra ^( TStart $e) rLimit )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                        adaptor.addChild(root_1, stream_bra.nextTree());
                        // ANML.g:658:70: ^( TStart $e)
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                        adaptor.addChild(root_2, stream_e.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }
                        adaptor.addChild(root_1, stream_rLimit.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:659:4: ( lLimit expr ket )=> lLimit e= expr ket
                    {
                    pushFollow(FOLLOW_lLimit_in_exist_time4006);
                    lLimit214=lLimit();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_lLimit.add(lLimit214.getTree());
                    pushFollow(FOLLOW_expr_in_exist_time4010);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                    pushFollow(FOLLOW_ket_in_exist_time4012);
                    ket215=ket();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_ket.add(ket215.getTree());


                    // AST REWRITE
                    // elements: lLimit, e, ket
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 659:42: -> ^( IndefiniteInterval lLimit ^( TEnd $e) ket )
                    {
                        // ANML.g:659:45: ^( IndefiniteInterval lLimit ^( TEnd $e) ket )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                        adaptor.addChild(root_1, stream_lLimit.nextTree());
                        // ANML.g:659:73: ^( TEnd $e)
                        {
                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_2);

                        adaptor.addChild(root_2, stream_e.nextTree());

                        adaptor.addChild(root_1, root_2);
                        }
                        adaptor.addChild(root_1, stream_ket.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 4 :
                    // ANML.g:660:4: bra ( ( Delta )=>d= delta_time Comma ( Skip )? ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip Comma ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) ) | e= expr Comma Skip ket -> ^( IndefiniteInterval bra ^( TStart $e) ket ) )
                    {
                    pushFollow(FOLLOW_bra_in_exist_time4034);
                    bra216=bra();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_bra.add(bra216.getTree());
                    // ANML.g:661:4: ( ( Delta )=>d= delta_time Comma ( Skip )? ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip Comma ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) ) | e= expr Comma Skip ket -> ^( IndefiniteInterval bra ^( TStart $e) ket ) )
                    int alt84=3;
                    int LA84_0 = input.LA(1);

                    if ( (LA84_0==Delta) && (synpred21_ANML())) {
                        alt84=1;
                    }
                    else if ( (LA84_0==Skip) && (synpred22_ANML())) {
                        alt84=2;
                    }
                    else if ( ((LA84_0>=Bra && LA84_0<=Ket)||LA84_0==ID||LA84_0==LeftP||(LA84_0>=NotLog && LA84_0<=NotBit)||(LA84_0>=LeftB && LA84_0<=Duration)||LA84_0==Contains||(LA84_0>=ForAll && LA84_0<=Exists)||LA84_0==Dots||LA84_0==Minus||(LA84_0>=Unordered && LA84_0<=Ordered)||(LA84_0>=Start && LA84_0<=Infinity)) ) {
                        alt84=3;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 84, 0, input);

                        throw nvae;
                    }
                    switch (alt84) {
                        case 1 :
                            // ANML.g:661:6: ( Delta )=>d= delta_time Comma ( Skip )? ket
                            {
                            pushFollow(FOLLOW_delta_time_in_exist_time4049);
                            d=delta_time();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_delta_time.add(d.getTree());
                            Comma217=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_exist_time4051); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma217);

                            // ANML.g:661:35: ( Skip )?
                            int alt82=2;
                            int LA82_0 = input.LA(1);

                            if ( (LA82_0==Skip) ) {
                                alt82=1;
                            }
                            switch (alt82) {
                                case 1 :
                                    // ANML.g:661:35: Skip
                                    {
                                    Skip218=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_exist_time4053); if (state.failed) return retval; 
                                    if ( state.backtracking==0 ) stream_Skip.add(Skip218);


                                    }
                                    break;

                            }

                            pushFollow(FOLLOW_ket_in_exist_time4056);
                            ket219=ket();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_ket.add(ket219.getTree());


                            // AST REWRITE
                            // elements: ket, d, bra
                            // token labels: 
                            // rule labels: retval, d
                            // token list labels: 
                            // rule list labels: 
                            if ( state.backtracking==0 ) {
                            retval.tree = root_0;
                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                            RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",d!=null?d.tree:null);

                            root_0 = (ANMLToken)adaptor.nil();
                            // 661:45: -> ^( IndefiniteInterval bra ^( TDuration $d) ket )
                            {
                                // ANML.g:661:48: ^( IndefiniteInterval bra ^( TDuration $d) ket )
                                {
                                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                                adaptor.addChild(root_1, stream_bra.nextTree());
                                // ANML.g:661:73: ^( TDuration $d)
                                {
                                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_2);

                                adaptor.addChild(root_2, stream_d.nextTree());

                                adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_1, stream_ket.nextTree());

                                adaptor.addChild(root_0, root_1);
                                }

                            }

                            retval.tree = root_0;}
                            }
                            break;
                        case 2 :
                            // ANML.g:662:6: ( Skip )=> Skip Comma ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) )
                            {
                            Skip220=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_exist_time4085); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(Skip220);

                            Comma221=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_exist_time4087); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma221);

                            // ANML.g:663:5: ( ( Delta )=>d= delta_time ket -> ^( IndefiniteInterval bra ^( TDuration $d) ket ) | ( Skip )=> Skip ket -> ^( IndefiniteInterval bra ket ) | e= expr ket -> ^( IndefiniteInterval bra ^( TEnd $e) ket ) )
                            int alt83=3;
                            int LA83_0 = input.LA(1);

                            if ( (LA83_0==Delta) && (synpred23_ANML())) {
                                alt83=1;
                            }
                            else if ( (LA83_0==Skip) && (synpred24_ANML())) {
                                alt83=2;
                            }
                            else if ( ((LA83_0>=Bra && LA83_0<=Ket)||LA83_0==ID||LA83_0==LeftP||(LA83_0>=NotLog && LA83_0<=NotBit)||(LA83_0>=LeftB && LA83_0<=Duration)||LA83_0==Contains||(LA83_0>=ForAll && LA83_0<=Exists)||LA83_0==Dots||LA83_0==Minus||(LA83_0>=Unordered && LA83_0<=Ordered)||(LA83_0>=Start && LA83_0<=Infinity)) ) {
                                alt83=3;
                            }
                            else {
                                if (state.backtracking>0) {state.failed=true; return retval;}
                                NoViableAltException nvae =
                                    new NoViableAltException("", 83, 0, input);

                                throw nvae;
                            }
                            switch (alt83) {
                                case 1 :
                                    // ANML.g:663:7: ( Delta )=>d= delta_time ket
                                    {
                                    pushFollow(FOLLOW_delta_time_in_exist_time4103);
                                    d=delta_time();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_delta_time.add(d.getTree());
                                    pushFollow(FOLLOW_ket_in_exist_time4105);
                                    ket222=ket();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_ket.add(ket222.getTree());


                                    // AST REWRITE
                                    // elements: d, ket, bra
                                    // token labels: 
                                    // rule labels: retval, d
                                    // token list labels: 
                                    // rule list labels: 
                                    if ( state.backtracking==0 ) {
                                    retval.tree = root_0;
                                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                                    RewriteRuleSubtreeStream stream_d=new RewriteRuleSubtreeStream(adaptor,"token d",d!=null?d.tree:null);

                                    root_0 = (ANMLToken)adaptor.nil();
                                    // 663:34: -> ^( IndefiniteInterval bra ^( TDuration $d) ket )
                                    {
                                        // ANML.g:663:37: ^( IndefiniteInterval bra ^( TDuration $d) ket )
                                        {
                                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                                        adaptor.addChild(root_1, stream_bra.nextTree());
                                        // ANML.g:663:62: ^( TDuration $d)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TDuration, "TDuration"), root_2);

                                        adaptor.addChild(root_2, stream_d.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        adaptor.addChild(root_1, stream_ket.nextTree());

                                        adaptor.addChild(root_0, root_1);
                                        }

                                    }

                                    retval.tree = root_0;}
                                    }
                                    break;
                                case 2 :
                                    // ANML.g:664:5: ( Skip )=> Skip ket
                                    {
                                    Skip223=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_exist_time4133); if (state.failed) return retval; 
                                    if ( state.backtracking==0 ) stream_Skip.add(Skip223);

                                    pushFollow(FOLLOW_ket_in_exist_time4135);
                                    ket224=ket();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_ket.add(ket224.getTree());


                                    // AST REWRITE
                                    // elements: bra, ket
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    if ( state.backtracking==0 ) {
                                    retval.tree = root_0;
                                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                                    root_0 = (ANMLToken)adaptor.nil();
                                    // 664:23: -> ^( IndefiniteInterval bra ket )
                                    {
                                        // ANML.g:664:26: ^( IndefiniteInterval bra ket )
                                        {
                                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                                        adaptor.addChild(root_1, stream_bra.nextTree());
                                        adaptor.addChild(root_1, stream_ket.nextTree());

                                        adaptor.addChild(root_0, root_1);
                                        }

                                    }

                                    retval.tree = root_0;}
                                    }
                                    break;
                                case 3 :
                                    // ANML.g:665:5: e= expr ket
                                    {
                                    pushFollow(FOLLOW_expr_in_exist_time4154);
                                    e=expr();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                                    pushFollow(FOLLOW_ket_in_exist_time4156);
                                    ket225=ket();

                                    state._fsp--;
                                    if (state.failed) return retval;
                                    if ( state.backtracking==0 ) stream_ket.add(ket225.getTree());


                                    // AST REWRITE
                                    // elements: e, bra, ket
                                    // token labels: 
                                    // rule labels: retval, e
                                    // token list labels: 
                                    // rule list labels: 
                                    if ( state.backtracking==0 ) {
                                    retval.tree = root_0;
                                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                                    root_0 = (ANMLToken)adaptor.nil();
                                    // 665:16: -> ^( IndefiniteInterval bra ^( TEnd $e) ket )
                                    {
                                        // ANML.g:665:19: ^( IndefiniteInterval bra ^( TEnd $e) ket )
                                        {
                                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                                        adaptor.addChild(root_1, stream_bra.nextTree());
                                        // ANML.g:665:44: ^( TEnd $e)
                                        {
                                        ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TEnd, "TEnd"), root_2);

                                        adaptor.addChild(root_2, stream_e.nextTree());

                                        adaptor.addChild(root_1, root_2);
                                        }
                                        adaptor.addChild(root_1, stream_ket.nextTree());

                                        adaptor.addChild(root_0, root_1);
                                        }

                                    }

                                    retval.tree = root_0;}
                                    }
                                    break;

                            }


                            }
                            break;
                        case 3 :
                            // ANML.g:667:6: e= expr Comma Skip ket
                            {
                            pushFollow(FOLLOW_expr_in_exist_time4186);
                            e=expr();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_expr.add(e.getTree());
                            Comma226=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_exist_time4188); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Comma.add(Comma226);

                            Skip227=(ANMLToken)match(input,Skip,FOLLOW_Skip_in_exist_time4190); if (state.failed) return retval; 
                            if ( state.backtracking==0 ) stream_Skip.add(Skip227);

                            pushFollow(FOLLOW_ket_in_exist_time4192);
                            ket228=ket();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_ket.add(ket228.getTree());


                            // AST REWRITE
                            // elements: bra, e, ket
                            // token labels: 
                            // rule labels: retval, e
                            // token list labels: 
                            // rule list labels: 
                            if ( state.backtracking==0 ) {
                            retval.tree = root_0;
                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                            RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                            root_0 = (ANMLToken)adaptor.nil();
                            // 667:28: -> ^( IndefiniteInterval bra ^( TStart $e) ket )
                            {
                                // ANML.g:667:31: ^( IndefiniteInterval bra ^( TStart $e) ket )
                                {
                                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(IndefiniteInterval, "IndefiniteInterval"), root_1);

                                adaptor.addChild(root_1, stream_bra.nextTree());
                                // ANML.g:667:56: ^( TStart $e)
                                {
                                ANMLToken root_2 = (ANMLToken)adaptor.nil();
                                root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TStart, "TStart"), root_2);

                                adaptor.addChild(root_2, stream_e.nextTree());

                                adaptor.addChild(root_1, root_2);
                                }
                                adaptor.addChild(root_1, stream_ket.nextTree());

                                adaptor.addChild(root_0, root_1);
                                }

                            }

                            retval.tree = root_0;}
                            }
                            break;

                    }


                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "exist_time"

    public static class delta_time_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "delta_time"
    // ANML.g:671:1: delta_time : Delta e_num_1 ;
    public final ANMLParser.delta_time_return delta_time() throws RecognitionException {
        ANMLParser.delta_time_return retval = new ANMLParser.delta_time_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Delta229=null;
        ANMLParser.e_num_1_return e_num_1230 = null;


        ANMLToken Delta229_tree=null;

        try {
            // ANML.g:671:12: ( Delta e_num_1 )
            // ANML.g:671:14: Delta e_num_1
            {
            root_0 = (ANMLToken)adaptor.nil();

            Delta229=(ANMLToken)match(input,Delta,FOLLOW_Delta_in_delta_time4223); if (state.failed) return retval;
            pushFollow(FOLLOW_e_num_1_in_delta_time4226);
            e_num_1230=e_num_1();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_1230.getTree());

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "delta_time"

    public static class bra_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "bra"
    // ANML.g:674:1: bra : ( LeftB -> ^( TBra At[$LeftB,\"At\"] ) | LeftP -> ^( TBra After[$LeftP,\"After\"] ) );
    public final ANMLParser.bra_return bra() throws RecognitionException {
        ANMLParser.bra_return retval = new ANMLParser.bra_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftB231=null;
        ANMLToken LeftP232=null;

        ANMLToken LeftB231_tree=null;
        ANMLToken LeftP232_tree=null;
        RewriteRuleTokenStream stream_LeftB=new RewriteRuleTokenStream(adaptor,"token LeftB");
        RewriteRuleTokenStream stream_LeftP=new RewriteRuleTokenStream(adaptor,"token LeftP");

        try {
            // ANML.g:675:2: ( LeftB -> ^( TBra At[$LeftB,\"At\"] ) | LeftP -> ^( TBra After[$LeftP,\"After\"] ) )
            int alt86=2;
            int LA86_0 = input.LA(1);

            if ( (LA86_0==LeftB) ) {
                alt86=1;
            }
            else if ( (LA86_0==LeftP) ) {
                alt86=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 86, 0, input);

                throw nvae;
            }
            switch (alt86) {
                case 1 :
                    // ANML.g:675:4: LeftB
                    {
                    LeftB231=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_bra4238); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftB.add(LeftB231);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 675:10: -> ^( TBra At[$LeftB,\"At\"] )
                    {
                        // ANML.g:675:13: ^( TBra At[$LeftB,\"At\"] )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TBra, "TBra"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(At, LeftB231, "At"));

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:676:4: LeftP
                    {
                    LeftP232=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_bra4253); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP232);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 676:10: -> ^( TBra After[$LeftP,\"After\"] )
                    {
                        // ANML.g:676:13: ^( TBra After[$LeftP,\"After\"] )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TBra, "TBra"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(After, LeftP232, "After"));

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "bra"

    public static class ket_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "ket"
    // ANML.g:679:1: ket : ( RightB -> ^( TKet At[$RightB,\"At\"] ) | RightP -> ^( TKet Before[$RightP,\"Before\"] ) );
    public final ANMLParser.ket_return ket() throws RecognitionException {
        ANMLParser.ket_return retval = new ANMLParser.ket_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken RightB233=null;
        ANMLToken RightP234=null;

        ANMLToken RightB233_tree=null;
        ANMLToken RightP234_tree=null;
        RewriteRuleTokenStream stream_RightP=new RewriteRuleTokenStream(adaptor,"token RightP");
        RewriteRuleTokenStream stream_RightB=new RewriteRuleTokenStream(adaptor,"token RightB");

        try {
            // ANML.g:680:2: ( RightB -> ^( TKet At[$RightB,\"At\"] ) | RightP -> ^( TKet Before[$RightP,\"Before\"] ) )
            int alt87=2;
            int LA87_0 = input.LA(1);

            if ( (LA87_0==RightB) ) {
                alt87=1;
            }
            else if ( (LA87_0==RightP) ) {
                alt87=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 87, 0, input);

                throw nvae;
            }
            switch (alt87) {
                case 1 :
                    // ANML.g:680:4: RightB
                    {
                    RightB233=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_ket4273); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightB.add(RightB233);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 680:11: -> ^( TKet At[$RightB,\"At\"] )
                    {
                        // ANML.g:680:14: ^( TKet At[$RightB,\"At\"] )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TKet, "TKet"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(At, RightB233, "At"));

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:681:4: RightP
                    {
                    RightP234=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_ket4288); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP234);



                    // AST REWRITE
                    // elements: 
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 681:11: -> ^( TKet Before[$RightP,\"Before\"] )
                    {
                        // ANML.g:681:14: ^( TKet Before[$RightP,\"Before\"] )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TKet, "TKet"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(Before, RightP234, "Before"));

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "ket"

    public static class lLimit_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "lLimit"
    // ANML.g:684:1: lLimit : Dots -> ^( TBra Before[$Dots,\"Before\"] ) ;
    public final ANMLParser.lLimit_return lLimit() throws RecognitionException {
        ANMLParser.lLimit_return retval = new ANMLParser.lLimit_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Dots235=null;

        ANMLToken Dots235_tree=null;
        RewriteRuleTokenStream stream_Dots=new RewriteRuleTokenStream(adaptor,"token Dots");

        try {
            // ANML.g:684:8: ( Dots -> ^( TBra Before[$Dots,\"Before\"] ) )
            // ANML.g:684:10: Dots
            {
            Dots235=(ANMLToken)match(input,Dots,FOLLOW_Dots_in_lLimit4306); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Dots.add(Dots235);



            // AST REWRITE
            // elements: 
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 684:15: -> ^( TBra Before[$Dots,\"Before\"] )
            {
                // ANML.g:684:18: ^( TBra Before[$Dots,\"Before\"] )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TBra, "TBra"), root_1);

                adaptor.addChild(root_1, (ANMLToken)adaptor.create(Before, Dots235, "Before"));

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "lLimit"

    public static class rLimit_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "rLimit"
    // ANML.g:685:1: rLimit : Dots -> ^( TKet After[$Dots,\"After\"] ) ;
    public final ANMLParser.rLimit_return rLimit() throws RecognitionException {
        ANMLParser.rLimit_return retval = new ANMLParser.rLimit_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Dots236=null;

        ANMLToken Dots236_tree=null;
        RewriteRuleTokenStream stream_Dots=new RewriteRuleTokenStream(adaptor,"token Dots");

        try {
            // ANML.g:685:8: ( Dots -> ^( TKet After[$Dots,\"After\"] ) )
            // ANML.g:685:10: Dots
            {
            Dots236=(ANMLToken)match(input,Dots,FOLLOW_Dots_in_rLimit4322); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_Dots.add(Dots236);



            // AST REWRITE
            // elements: 
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 685:15: -> ^( TKet After[$Dots,\"After\"] )
            {
                // ANML.g:685:18: ^( TKet After[$Dots,\"After\"] )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TKet, "TKet"), root_1);

                adaptor.addChild(root_1, (ANMLToken)adaptor.create(After, Dots236, "After"));

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rLimit"

    public static class expr_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "expr"
    // ANML.g:689:1: expr : ( ( e_prefix )=> e_prefix | e_log_1 );
    public final ANMLParser.expr_return expr() throws RecognitionException {
        ANMLParser.expr_return retval = new ANMLParser.expr_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.e_prefix_return e_prefix237 = null;

        ANMLParser.e_log_1_return e_log_1238 = null;



        try {
            // ANML.g:690:2: ( ( e_prefix )=> e_prefix | e_log_1 )
            int alt88=2;
            alt88 = dfa88.predict(input);
            switch (alt88) {
                case 1 :
                    // ANML.g:690:4: ( e_prefix )=> e_prefix
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_prefix_in_expr4346);
                    e_prefix237=e_prefix();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix237.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:691:4: e_log_1
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_log_1_in_expr4351);
                    e_log_1238=e_log_1();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_1238.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "expr"

    public static class e_prefix_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_prefix"
    // ANML.g:694:1: e_prefix : ( ID Colon e= expr -> ^( Label[$Colon] ID $e) | ( interval expr )=> interval e= expr -> ^( TimedExpr interval $e) | ( Contains )=> Contains ( ( exist_time expr )=> exist_time e= expr -> ^( ContainsSomeExpr[$Contains] exist_time $e) | e= expr -> ^( ContainsAllExpr[$Contains] $e) ) | ForAll param_list e= expr -> ^( ForAllExpr[$ForAll] param_list $e) | Exists param_list e= expr -> ^( ExistsExpr[$Exists] param_list $e) );
    public final ANMLParser.e_prefix_return e_prefix() throws RecognitionException {
        T_stack.push(new T_scope());

        ANMLParser.e_prefix_return retval = new ANMLParser.e_prefix_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID239=null;
        ANMLToken Colon240=null;
        ANMLToken Contains242=null;
        ANMLToken ForAll244=null;
        ANMLToken Exists246=null;
        ANMLParser.expr_return e = null;

        ANMLParser.interval_return interval241 = null;

        ANMLParser.exist_time_return exist_time243 = null;

        ANMLParser.param_list_return param_list245 = null;

        ANMLParser.param_list_return param_list247 = null;


        ANMLToken ID239_tree=null;
        ANMLToken Colon240_tree=null;
        ANMLToken Contains242_tree=null;
        ANMLToken ForAll244_tree=null;
        ANMLToken Exists246_tree=null;
        RewriteRuleTokenStream stream_Colon=new RewriteRuleTokenStream(adaptor,"token Colon");
        RewriteRuleTokenStream stream_Exists=new RewriteRuleTokenStream(adaptor,"token Exists");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleTokenStream stream_Contains=new RewriteRuleTokenStream(adaptor,"token Contains");
        RewriteRuleTokenStream stream_ForAll=new RewriteRuleTokenStream(adaptor,"token ForAll");
        RewriteRuleSubtreeStream stream_interval=new RewriteRuleSubtreeStream(adaptor,"rule interval");
        RewriteRuleSubtreeStream stream_exist_time=new RewriteRuleSubtreeStream(adaptor,"rule exist_time");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        RewriteRuleSubtreeStream stream_param_list=new RewriteRuleSubtreeStream(adaptor,"rule param_list");
        try {
            // ANML.g:697:2: ( ID Colon e= expr -> ^( Label[$Colon] ID $e) | ( interval expr )=> interval e= expr -> ^( TimedExpr interval $e) | ( Contains )=> Contains ( ( exist_time expr )=> exist_time e= expr -> ^( ContainsSomeExpr[$Contains] exist_time $e) | e= expr -> ^( ContainsAllExpr[$Contains] $e) ) | ForAll param_list e= expr -> ^( ForAllExpr[$ForAll] param_list $e) | Exists param_list e= expr -> ^( ExistsExpr[$Exists] param_list $e) )
            int alt90=5;
            int LA90_0 = input.LA(1);

            if ( (LA90_0==ID) ) {
                alt90=1;
            }
            else if ( (LA90_0==LeftB) && (synpred26_ANML())) {
                alt90=2;
            }
            else if ( (LA90_0==LeftP) && (synpred26_ANML())) {
                alt90=2;
            }
            else if ( (LA90_0==Dots) && (synpred26_ANML())) {
                alt90=2;
            }
            else if ( (LA90_0==Contains) && (synpred27_ANML())) {
                alt90=3;
            }
            else if ( (LA90_0==ForAll) ) {
                alt90=4;
            }
            else if ( (LA90_0==Exists) ) {
                alt90=5;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 90, 0, input);

                throw nvae;
            }
            switch (alt90) {
                case 1 :
                    // ANML.g:697:4: ID Colon e= expr
                    {
                    ID239=(ANMLToken)match(input,ID,FOLLOW_ID_in_e_prefix4368); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID239);

                    Colon240=(ANMLToken)match(input,Colon,FOLLOW_Colon_in_e_prefix4370); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Colon.add(Colon240);

                    pushFollow(FOLLOW_expr_in_e_prefix4374);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                    // AST REWRITE
                    // elements: ID, e
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 698:3: -> ^( Label[$Colon] ID $e)
                    {
                        // ANML.g:698:6: ^( Label[$Colon] ID $e)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Label, Colon240), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_e.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:699:4: ( interval expr )=> interval e= expr
                    {
                    pushFollow(FOLLOW_interval_in_e_prefix4400);
                    interval241=interval();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_interval.add(interval241.getTree());
                    pushFollow(FOLLOW_expr_in_e_prefix4404);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                    // AST REWRITE
                    // elements: e, interval
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 700:3: -> ^( TimedExpr interval $e)
                    {
                        // ANML.g:700:6: ^( TimedExpr interval $e)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(TimedExpr, "TimedExpr"), root_1);

                        adaptor.addChild(root_1, stream_interval.nextTree());
                        adaptor.addChild(root_1, stream_e.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:703:4: ( Contains )=> Contains ( ( exist_time expr )=> exist_time e= expr -> ^( ContainsSomeExpr[$Contains] exist_time $e) | e= expr -> ^( ContainsAllExpr[$Contains] $e) )
                    {
                    Contains242=(ANMLToken)match(input,Contains,FOLLOW_Contains_in_e_prefix4429); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Contains.add(Contains242);

                    // ANML.g:704:3: ( ( exist_time expr )=> exist_time e= expr -> ^( ContainsSomeExpr[$Contains] exist_time $e) | e= expr -> ^( ContainsAllExpr[$Contains] $e) )
                    int alt89=2;
                    alt89 = dfa89.predict(input);
                    switch (alt89) {
                        case 1 :
                            // ANML.g:704:4: ( exist_time expr )=> exist_time e= expr
                            {
                            pushFollow(FOLLOW_exist_time_in_e_prefix4442);
                            exist_time243=exist_time();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_exist_time.add(exist_time243.getTree());
                            pushFollow(FOLLOW_expr_in_e_prefix4446);
                            e=expr();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                            // AST REWRITE
                            // elements: exist_time, e
                            // token labels: 
                            // rule labels: retval, e
                            // token list labels: 
                            // rule list labels: 
                            if ( state.backtracking==0 ) {
                            retval.tree = root_0;
                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                            RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                            root_0 = (ANMLToken)adaptor.nil();
                            // 705:4: -> ^( ContainsSomeExpr[$Contains] exist_time $e)
                            {
                                // ANML.g:705:7: ^( ContainsSomeExpr[$Contains] exist_time $e)
                                {
                                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ContainsSomeExpr, Contains242), root_1);

                                adaptor.addChild(root_1, stream_exist_time.nextTree());
                                adaptor.addChild(root_1, stream_e.nextTree());

                                adaptor.addChild(root_0, root_1);
                                }

                            }

                            retval.tree = root_0;}
                            }
                            break;
                        case 2 :
                            // ANML.g:706:5: e= expr
                            {
                            pushFollow(FOLLOW_expr_in_e_prefix4470);
                            e=expr();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                            // AST REWRITE
                            // elements: e
                            // token labels: 
                            // rule labels: retval, e
                            // token list labels: 
                            // rule list labels: 
                            if ( state.backtracking==0 ) {
                            retval.tree = root_0;
                            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                            RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                            root_0 = (ANMLToken)adaptor.nil();
                            // 707:4: -> ^( ContainsAllExpr[$Contains] $e)
                            {
                                // ANML.g:707:7: ^( ContainsAllExpr[$Contains] $e)
                                {
                                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ContainsAllExpr, Contains242), root_1);

                                adaptor.addChild(root_1, stream_e.nextTree());

                                adaptor.addChild(root_0, root_1);
                                }

                            }

                            retval.tree = root_0;}
                            }
                            break;

                    }


                    }
                    break;
                case 4 :
                    // ANML.g:709:4: ForAll param_list e= expr
                    {
                    ForAll244=(ANMLToken)match(input,ForAll,FOLLOW_ForAll_in_e_prefix4494); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ForAll.add(ForAll244);

                    pushFollow(FOLLOW_param_list_in_e_prefix4496);
                    param_list245=param_list();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_param_list.add(param_list245.getTree());
                    pushFollow(FOLLOW_expr_in_e_prefix4500);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                    // AST REWRITE
                    // elements: param_list, e
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 710:3: -> ^( ForAllExpr[$ForAll] param_list $e)
                    {
                        // ANML.g:710:6: ^( ForAllExpr[$ForAll] param_list $e)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ForAllExpr, ForAll244), root_1);

                        adaptor.addChild(root_1, stream_param_list.nextTree());
                        adaptor.addChild(root_1, stream_e.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 5 :
                    // ANML.g:711:4: Exists param_list e= expr
                    {
                    Exists246=(ANMLToken)match(input,Exists,FOLLOW_Exists_in_e_prefix4519); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Exists.add(Exists246);

                    pushFollow(FOLLOW_param_list_in_e_prefix4521);
                    param_list247=param_list();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_param_list.add(param_list247.getTree());
                    pushFollow(FOLLOW_expr_in_e_prefix4525);
                    e=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(e.getTree());


                    // AST REWRITE
                    // elements: e, param_list
                    // token labels: 
                    // rule labels: retval, e
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
                    RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,"token e",e!=null?e.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 712:3: -> ^( ExistsExpr[$Exists] param_list $e)
                    {
                        // ANML.g:712:6: ^( ExistsExpr[$Exists] param_list $e)
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(ExistsExpr, Exists246), root_1);

                        adaptor.addChild(root_1, stream_param_list.nextTree());
                        adaptor.addChild(root_1, stream_e.nextTree());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
            T_stack.pop();

        }
        return retval;
    }
    // $ANTLR end "e_prefix"

    public static class e_log_1_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_1"
    // ANML.g:721:1: e_log_1 : e_log_2 ( ( Implies )=> Implies ( ( e_prefix )=> e_prefix | e_log_1 ) )? ;
    public final ANMLParser.e_log_1_return e_log_1() throws RecognitionException {
        ANMLParser.e_log_1_return retval = new ANMLParser.e_log_1_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Implies249=null;
        ANMLParser.e_log_2_return e_log_2248 = null;

        ANMLParser.e_prefix_return e_prefix250 = null;

        ANMLParser.e_log_1_return e_log_1251 = null;


        ANMLToken Implies249_tree=null;

        try {
            // ANML.g:722:2: ( e_log_2 ( ( Implies )=> Implies ( ( e_prefix )=> e_prefix | e_log_1 ) )? )
            // ANML.g:722:4: e_log_2 ( ( Implies )=> Implies ( ( e_prefix )=> e_prefix | e_log_1 ) )?
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_log_2_in_e_log_14560);
            e_log_2248=e_log_2();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_2248.getTree());
            // ANML.g:722:12: ( ( Implies )=> Implies ( ( e_prefix )=> e_prefix | e_log_1 ) )?
            int alt92=2;
            int LA92_0 = input.LA(1);

            if ( (LA92_0==Implies) ) {
                int LA92_1 = input.LA(2);

                if ( (synpred29_ANML()) ) {
                    alt92=1;
                }
            }
            switch (alt92) {
                case 1 :
                    // ANML.g:722:13: ( Implies )=> Implies ( ( e_prefix )=> e_prefix | e_log_1 )
                    {
                    Implies249=(ANMLToken)match(input,Implies,FOLLOW_Implies_in_e_log_14567); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    Implies249_tree = (ANMLToken)adaptor.create(Implies249);
                    root_0 = (ANMLToken)adaptor.becomeRoot(Implies249_tree, root_0);
                    }
                    // ANML.g:722:33: ( ( e_prefix )=> e_prefix | e_log_1 )
                    int alt91=2;
                    alt91 = dfa91.predict(input);
                    switch (alt91) {
                        case 1 :
                            // ANML.g:722:34: ( e_prefix )=> e_prefix
                            {
                            pushFollow(FOLLOW_e_prefix_in_e_log_14575);
                            e_prefix250=e_prefix();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix250.getTree());

                            }
                            break;
                        case 2 :
                            // ANML.g:722:57: e_log_1
                            {
                            pushFollow(FOLLOW_e_log_1_in_e_log_14579);
                            e_log_1251=e_log_1();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_1251.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_1"

    public static class e_log_2_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_2"
    // ANML.g:725:1: e_log_2 : e_log_3 ( ( EqualLog )=> EqualLog ( ( e_prefix )=> e_prefix | e_log_3 ) )* ;
    public final ANMLParser.e_log_2_return e_log_2() throws RecognitionException {
        ANMLParser.e_log_2_return retval = new ANMLParser.e_log_2_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken EqualLog253=null;
        ANMLParser.e_log_3_return e_log_3252 = null;

        ANMLParser.e_prefix_return e_prefix254 = null;

        ANMLParser.e_log_3_return e_log_3255 = null;


        ANMLToken EqualLog253_tree=null;

        try {
            // ANML.g:726:2: ( e_log_3 ( ( EqualLog )=> EqualLog ( ( e_prefix )=> e_prefix | e_log_3 ) )* )
            // ANML.g:726:4: e_log_3 ( ( EqualLog )=> EqualLog ( ( e_prefix )=> e_prefix | e_log_3 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_log_3_in_e_log_24592);
            e_log_3252=e_log_3();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_3252.getTree());
            // ANML.g:726:12: ( ( EqualLog )=> EqualLog ( ( e_prefix )=> e_prefix | e_log_3 ) )*
            loop94:
            do {
                int alt94=2;
                int LA94_0 = input.LA(1);

                if ( (LA94_0==EqualLog) ) {
                    int LA94_2 = input.LA(2);

                    if ( (synpred31_ANML()) ) {
                        alt94=1;
                    }


                }


                switch (alt94) {
            	case 1 :
            	    // ANML.g:726:13: ( EqualLog )=> EqualLog ( ( e_prefix )=> e_prefix | e_log_3 )
            	    {
            	    EqualLog253=(ANMLToken)match(input,EqualLog,FOLLOW_EqualLog_in_e_log_24599); if (state.failed) return retval;
            	    if ( state.backtracking==0 ) {
            	    EqualLog253_tree = (ANMLToken)adaptor.create(EqualLog253);
            	    root_0 = (ANMLToken)adaptor.becomeRoot(EqualLog253_tree, root_0);
            	    }
            	    // ANML.g:726:35: ( ( e_prefix )=> e_prefix | e_log_3 )
            	    int alt93=2;
            	    alt93 = dfa93.predict(input);
            	    switch (alt93) {
            	        case 1 :
            	            // ANML.g:726:36: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_log_24607);
            	            e_prefix254=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix254.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:726:59: e_log_3
            	            {
            	            pushFollow(FOLLOW_e_log_3_in_e_log_24611);
            	            e_log_3255=e_log_3();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_3255.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop94;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_2"

    public static class e_log_3_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_3"
    // ANML.g:729:1: e_log_3 : e_log_4 ( ( XorLog )=> XorLog ( ( e_prefix )=> e_prefix | e_log_4 ) )* ;
    public final ANMLParser.e_log_3_return e_log_3() throws RecognitionException {
        ANMLParser.e_log_3_return retval = new ANMLParser.e_log_3_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken XorLog257=null;
        ANMLParser.e_log_4_return e_log_4256 = null;

        ANMLParser.e_prefix_return e_prefix258 = null;

        ANMLParser.e_log_4_return e_log_4259 = null;


        ANMLToken XorLog257_tree=null;

        try {
            // ANML.g:730:2: ( e_log_4 ( ( XorLog )=> XorLog ( ( e_prefix )=> e_prefix | e_log_4 ) )* )
            // ANML.g:730:4: e_log_4 ( ( XorLog )=> XorLog ( ( e_prefix )=> e_prefix | e_log_4 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_log_4_in_e_log_34624);
            e_log_4256=e_log_4();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_4256.getTree());
            // ANML.g:730:12: ( ( XorLog )=> XorLog ( ( e_prefix )=> e_prefix | e_log_4 ) )*
            loop96:
            do {
                int alt96=2;
                int LA96_0 = input.LA(1);

                if ( (LA96_0==XorLog) ) {
                    int LA96_2 = input.LA(2);

                    if ( (synpred33_ANML()) ) {
                        alt96=1;
                    }


                }


                switch (alt96) {
            	case 1 :
            	    // ANML.g:730:13: ( XorLog )=> XorLog ( ( e_prefix )=> e_prefix | e_log_4 )
            	    {
            	    XorLog257=(ANMLToken)match(input,XorLog,FOLLOW_XorLog_in_e_log_34631); if (state.failed) return retval;
            	    if ( state.backtracking==0 ) {
            	    XorLog257_tree = (ANMLToken)adaptor.create(XorLog257);
            	    root_0 = (ANMLToken)adaptor.becomeRoot(XorLog257_tree, root_0);
            	    }
            	    // ANML.g:730:31: ( ( e_prefix )=> e_prefix | e_log_4 )
            	    int alt95=2;
            	    alt95 = dfa95.predict(input);
            	    switch (alt95) {
            	        case 1 :
            	            // ANML.g:730:32: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_log_34639);
            	            e_prefix258=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix258.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:730:55: e_log_4
            	            {
            	            pushFollow(FOLLOW_e_log_4_in_e_log_34643);
            	            e_log_4259=e_log_4();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_4259.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop96;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_3"

    public static class e_log_4_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_4"
    // ANML.g:745:1: e_log_4 : e_log_5 ( ( OrLog )=> OrLog ( ( e_prefix )=> e_prefix | e_log_5 ) )* ;
    public final ANMLParser.e_log_4_return e_log_4() throws RecognitionException {
        ANMLParser.e_log_4_return retval = new ANMLParser.e_log_4_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken OrLog261=null;
        ANMLParser.e_log_5_return e_log_5260 = null;

        ANMLParser.e_prefix_return e_prefix262 = null;

        ANMLParser.e_log_5_return e_log_5263 = null;


        ANMLToken OrLog261_tree=null;

        try {
            // ANML.g:746:2: ( e_log_5 ( ( OrLog )=> OrLog ( ( e_prefix )=> e_prefix | e_log_5 ) )* )
            // ANML.g:746:4: e_log_5 ( ( OrLog )=> OrLog ( ( e_prefix )=> e_prefix | e_log_5 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_log_5_in_e_log_44669);
            e_log_5260=e_log_5();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_5260.getTree());
            // ANML.g:746:12: ( ( OrLog )=> OrLog ( ( e_prefix )=> e_prefix | e_log_5 ) )*
            loop98:
            do {
                int alt98=2;
                int LA98_0 = input.LA(1);

                if ( (LA98_0==OrLog) ) {
                    int LA98_2 = input.LA(2);

                    if ( (synpred35_ANML()) ) {
                        alt98=1;
                    }


                }


                switch (alt98) {
            	case 1 :
            	    // ANML.g:746:13: ( OrLog )=> OrLog ( ( e_prefix )=> e_prefix | e_log_5 )
            	    {
            	    OrLog261=(ANMLToken)match(input,OrLog,FOLLOW_OrLog_in_e_log_44676); if (state.failed) return retval;
            	    if ( state.backtracking==0 ) {
            	    OrLog261_tree = (ANMLToken)adaptor.create(OrLog261);
            	    root_0 = (ANMLToken)adaptor.becomeRoot(OrLog261_tree, root_0);
            	    }
            	    // ANML.g:746:29: ( ( e_prefix )=> e_prefix | e_log_5 )
            	    int alt97=2;
            	    alt97 = dfa97.predict(input);
            	    switch (alt97) {
            	        case 1 :
            	            // ANML.g:746:30: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_log_44684);
            	            e_prefix262=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix262.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:746:53: e_log_5
            	            {
            	            pushFollow(FOLLOW_e_log_5_in_e_log_44688);
            	            e_log_5263=e_log_5();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_5263.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop98;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_4"

    public static class e_log_5_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_5"
    // ANML.g:749:1: e_log_5 : e_log_6 ( ( AndLog )=> AndLog ( ( e_prefix )=> e_prefix | e_log_6 ) )* ;
    public final ANMLParser.e_log_5_return e_log_5() throws RecognitionException {
        ANMLParser.e_log_5_return retval = new ANMLParser.e_log_5_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken AndLog265=null;
        ANMLParser.e_log_6_return e_log_6264 = null;

        ANMLParser.e_prefix_return e_prefix266 = null;

        ANMLParser.e_log_6_return e_log_6267 = null;


        ANMLToken AndLog265_tree=null;

        try {
            // ANML.g:750:2: ( e_log_6 ( ( AndLog )=> AndLog ( ( e_prefix )=> e_prefix | e_log_6 ) )* )
            // ANML.g:750:4: e_log_6 ( ( AndLog )=> AndLog ( ( e_prefix )=> e_prefix | e_log_6 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_log_6_in_e_log_54702);
            e_log_6264=e_log_6();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_6264.getTree());
            // ANML.g:750:12: ( ( AndLog )=> AndLog ( ( e_prefix )=> e_prefix | e_log_6 ) )*
            loop100:
            do {
                int alt100=2;
                int LA100_0 = input.LA(1);

                if ( (LA100_0==AndLog) ) {
                    int LA100_2 = input.LA(2);

                    if ( (synpred37_ANML()) ) {
                        alt100=1;
                    }


                }


                switch (alt100) {
            	case 1 :
            	    // ANML.g:750:13: ( AndLog )=> AndLog ( ( e_prefix )=> e_prefix | e_log_6 )
            	    {
            	    AndLog265=(ANMLToken)match(input,AndLog,FOLLOW_AndLog_in_e_log_54709); if (state.failed) return retval;
            	    if ( state.backtracking==0 ) {
            	    AndLog265_tree = (ANMLToken)adaptor.create(AndLog265);
            	    root_0 = (ANMLToken)adaptor.becomeRoot(AndLog265_tree, root_0);
            	    }
            	    // ANML.g:750:31: ( ( e_prefix )=> e_prefix | e_log_6 )
            	    int alt99=2;
            	    alt99 = dfa99.predict(input);
            	    switch (alt99) {
            	        case 1 :
            	            // ANML.g:750:32: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_log_54717);
            	            e_prefix266=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix266.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:750:55: e_log_6
            	            {
            	            pushFollow(FOLLOW_e_log_6_in_e_log_54721);
            	            e_log_6267=e_log_6();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_6267.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop100;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_5"

    public static class e_log_6_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_6"
    // ANML.g:753:1: e_log_6 : ( ( NotLog )=> NotLog ( ( e_prefix )=> e_prefix | e_log_6 ) | e_log_7 );
    public final ANMLParser.e_log_6_return e_log_6() throws RecognitionException {
        ANMLParser.e_log_6_return retval = new ANMLParser.e_log_6_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken NotLog268=null;
        ANMLParser.e_prefix_return e_prefix269 = null;

        ANMLParser.e_log_6_return e_log_6270 = null;

        ANMLParser.e_log_7_return e_log_7271 = null;


        ANMLToken NotLog268_tree=null;

        try {
            // ANML.g:754:2: ( ( NotLog )=> NotLog ( ( e_prefix )=> e_prefix | e_log_6 ) | e_log_7 )
            int alt102=2;
            int LA102_0 = input.LA(1);

            if ( (LA102_0==NotLog) && (synpred39_ANML())) {
                alt102=1;
            }
            else if ( ((LA102_0>=Bra && LA102_0<=Ket)||LA102_0==ID||LA102_0==LeftP||LA102_0==NotBit||LA102_0==Duration||LA102_0==Minus||(LA102_0>=Unordered && LA102_0<=Ordered)||(LA102_0>=Start && LA102_0<=Infinity)) ) {
                alt102=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 102, 0, input);

                throw nvae;
            }
            switch (alt102) {
                case 1 :
                    // ANML.g:754:4: ( NotLog )=> NotLog ( ( e_prefix )=> e_prefix | e_log_6 )
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    NotLog268=(ANMLToken)match(input,NotLog,FOLLOW_NotLog_in_e_log_64738); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    NotLog268_tree = (ANMLToken)adaptor.create(NotLog268);
                    root_0 = (ANMLToken)adaptor.becomeRoot(NotLog268_tree, root_0);
                    }
                    // ANML.g:754:22: ( ( e_prefix )=> e_prefix | e_log_6 )
                    int alt101=2;
                    alt101 = dfa101.predict(input);
                    switch (alt101) {
                        case 1 :
                            // ANML.g:754:23: ( e_prefix )=> e_prefix
                            {
                            pushFollow(FOLLOW_e_prefix_in_e_log_64746);
                            e_prefix269=e_prefix();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix269.getTree());

                            }
                            break;
                        case 2 :
                            // ANML.g:754:46: e_log_6
                            {
                            pushFollow(FOLLOW_e_log_6_in_e_log_64750);
                            e_log_6270=e_log_6();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_6270.getTree());

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // ANML.g:755:4: e_log_7
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_log_7_in_e_log_64756);
                    e_log_7271=e_log_7();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_log_7271.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_6"

    public static class e_log_7_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_log_7"
    // ANML.g:758:1: e_log_7 : e_num_1 ( ( num_relop )=> num_relop ( ( e_prefix )=> e_prefix | e_num_1 ) )? ;
    public final ANMLParser.e_log_7_return e_log_7() throws RecognitionException {
        ANMLParser.e_log_7_return retval = new ANMLParser.e_log_7_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.e_num_1_return e_num_1272 = null;

        ANMLParser.num_relop_return num_relop273 = null;

        ANMLParser.e_prefix_return e_prefix274 = null;

        ANMLParser.e_num_1_return e_num_1275 = null;



        try {
            // ANML.g:759:2: ( e_num_1 ( ( num_relop )=> num_relop ( ( e_prefix )=> e_prefix | e_num_1 ) )? )
            // ANML.g:759:4: e_num_1 ( ( num_relop )=> num_relop ( ( e_prefix )=> e_prefix | e_num_1 ) )?
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_num_1_in_e_log_74766);
            e_num_1272=e_num_1();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_1272.getTree());
            // ANML.g:759:12: ( ( num_relop )=> num_relop ( ( e_prefix )=> e_prefix | e_num_1 ) )?
            int alt104=2;
            int LA104_0 = input.LA(1);

            if ( (LA104_0==Equal) ) {
                int LA104_1 = input.LA(2);

                if ( (synpred41_ANML()) ) {
                    alt104=1;
                }
            }
            else if ( (LA104_0==LessThan||(LA104_0>=NotEqual && LA104_0<=GreaterThanE)) ) {
                int LA104_3 = input.LA(2);

                if ( (synpred41_ANML()) ) {
                    alt104=1;
                }
            }
            switch (alt104) {
                case 1 :
                    // ANML.g:759:13: ( num_relop )=> num_relop ( ( e_prefix )=> e_prefix | e_num_1 )
                    {
                    pushFollow(FOLLOW_num_relop_in_e_log_74773);
                    num_relop273=num_relop();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) root_0 = (ANMLToken)adaptor.becomeRoot(num_relop273.getTree(), root_0);
                    // ANML.g:759:37: ( ( e_prefix )=> e_prefix | e_num_1 )
                    int alt103=2;
                    alt103 = dfa103.predict(input);
                    switch (alt103) {
                        case 1 :
                            // ANML.g:759:38: ( e_prefix )=> e_prefix
                            {
                            pushFollow(FOLLOW_e_prefix_in_e_log_74781);
                            e_prefix274=e_prefix();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix274.getTree());

                            }
                            break;
                        case 2 :
                            // ANML.g:759:61: e_num_1
                            {
                            pushFollow(FOLLOW_e_num_1_in_e_log_74785);
                            e_num_1275=e_num_1();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_1275.getTree());

                            }
                            break;

                    }


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_log_7"

    public static class e_num_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_num"
    // ANML.g:762:1: e_num : ( ( e_prefix )=> e_prefix | e_num_1 );
    public final ANMLParser.e_num_return e_num() throws RecognitionException {
        ANMLParser.e_num_return retval = new ANMLParser.e_num_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.e_prefix_return e_prefix276 = null;

        ANMLParser.e_num_1_return e_num_1277 = null;



        try {
            // ANML.g:763:2: ( ( e_prefix )=> e_prefix | e_num_1 )
            int alt105=2;
            alt105 = dfa105.predict(input);
            switch (alt105) {
                case 1 :
                    // ANML.g:763:4: ( e_prefix )=> e_prefix
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_prefix_in_e_num4802);
                    e_prefix276=e_prefix();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix276.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:764:4: e_num_1
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_num_1_in_e_num4807);
                    e_num_1277=e_num_1();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_1277.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_num"

    public static class e_num_1_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_num_1"
    // ANML.g:767:1: e_num_1 : e_num_2 ( ( XorBit )=> XorBit ( ( e_prefix )=> e_prefix | e_num_2 ) )* ;
    public final ANMLParser.e_num_1_return e_num_1() throws RecognitionException {
        ANMLParser.e_num_1_return retval = new ANMLParser.e_num_1_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken XorBit279=null;
        ANMLParser.e_num_2_return e_num_2278 = null;

        ANMLParser.e_prefix_return e_prefix280 = null;

        ANMLParser.e_num_2_return e_num_2281 = null;


        ANMLToken XorBit279_tree=null;

        try {
            // ANML.g:768:2: ( e_num_2 ( ( XorBit )=> XorBit ( ( e_prefix )=> e_prefix | e_num_2 ) )* )
            // ANML.g:768:4: e_num_2 ( ( XorBit )=> XorBit ( ( e_prefix )=> e_prefix | e_num_2 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_num_2_in_e_num_14817);
            e_num_2278=e_num_2();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_2278.getTree());
            // ANML.g:768:12: ( ( XorBit )=> XorBit ( ( e_prefix )=> e_prefix | e_num_2 ) )*
            loop107:
            do {
                int alt107=2;
                int LA107_0 = input.LA(1);

                if ( (LA107_0==XorBit) ) {
                    int LA107_2 = input.LA(2);

                    if ( (synpred44_ANML()) ) {
                        alt107=1;
                    }


                }


                switch (alt107) {
            	case 1 :
            	    // ANML.g:768:13: ( XorBit )=> XorBit ( ( e_prefix )=> e_prefix | e_num_2 )
            	    {
            	    XorBit279=(ANMLToken)match(input,XorBit,FOLLOW_XorBit_in_e_num_14824); if (state.failed) return retval;
            	    if ( state.backtracking==0 ) {
            	    XorBit279_tree = (ANMLToken)adaptor.create(XorBit279);
            	    root_0 = (ANMLToken)adaptor.becomeRoot(XorBit279_tree, root_0);
            	    }
            	    // ANML.g:768:31: ( ( e_prefix )=> e_prefix | e_num_2 )
            	    int alt106=2;
            	    alt106 = dfa106.predict(input);
            	    switch (alt106) {
            	        case 1 :
            	            // ANML.g:768:32: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_num_14832);
            	            e_prefix280=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix280.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:768:55: e_num_2
            	            {
            	            pushFollow(FOLLOW_e_num_2_in_e_num_14836);
            	            e_num_2281=e_num_2();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_2281.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop107;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_num_1"

    public static class e_num_2_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_num_2"
    // ANML.g:771:1: e_num_2 : e_num_3 ( ( Plus | Minus | OrBit )=> ( Plus | Minus | OrBit ) ( ( e_prefix )=> e_prefix | e_num_3 ) )* ;
    public final ANMLParser.e_num_2_return e_num_2() throws RecognitionException {
        ANMLParser.e_num_2_return retval = new ANMLParser.e_num_2_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Plus283=null;
        ANMLToken Minus284=null;
        ANMLToken OrBit285=null;
        ANMLParser.e_num_3_return e_num_3282 = null;

        ANMLParser.e_prefix_return e_prefix286 = null;

        ANMLParser.e_num_3_return e_num_3287 = null;


        ANMLToken Plus283_tree=null;
        ANMLToken Minus284_tree=null;
        ANMLToken OrBit285_tree=null;

        try {
            // ANML.g:772:2: ( e_num_3 ( ( Plus | Minus | OrBit )=> ( Plus | Minus | OrBit ) ( ( e_prefix )=> e_prefix | e_num_3 ) )* )
            // ANML.g:772:4: e_num_3 ( ( Plus | Minus | OrBit )=> ( Plus | Minus | OrBit ) ( ( e_prefix )=> e_prefix | e_num_3 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_num_3_in_e_num_24849);
            e_num_3282=e_num_3();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_3282.getTree());
            // ANML.g:772:12: ( ( Plus | Minus | OrBit )=> ( Plus | Minus | OrBit ) ( ( e_prefix )=> e_prefix | e_num_3 ) )*
            loop110:
            do {
                int alt110=2;
                switch ( input.LA(1) ) {
                case Minus:
                    {
                    int LA110_2 = input.LA(2);

                    if ( (synpred46_ANML()) ) {
                        alt110=1;
                    }


                    }
                    break;
                case Plus:
                    {
                    int LA110_3 = input.LA(2);

                    if ( (synpred46_ANML()) ) {
                        alt110=1;
                    }


                    }
                    break;
                case OrBit:
                    {
                    int LA110_4 = input.LA(2);

                    if ( (synpred46_ANML()) ) {
                        alt110=1;
                    }


                    }
                    break;

                }

                switch (alt110) {
            	case 1 :
            	    // ANML.g:772:13: ( Plus | Minus | OrBit )=> ( Plus | Minus | OrBit ) ( ( e_prefix )=> e_prefix | e_num_3 )
            	    {
            	    // ANML.g:772:33: ( Plus | Minus | OrBit )
            	    int alt108=3;
            	    switch ( input.LA(1) ) {
            	    case Plus:
            	        {
            	        alt108=1;
            	        }
            	        break;
            	    case Minus:
            	        {
            	        alt108=2;
            	        }
            	        break;
            	    case OrBit:
            	        {
            	        alt108=3;
            	        }
            	        break;
            	    default:
            	        if (state.backtracking>0) {state.failed=true; return retval;}
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 108, 0, input);

            	        throw nvae;
            	    }

            	    switch (alt108) {
            	        case 1 :
            	            // ANML.g:772:34: Plus
            	            {
            	            Plus283=(ANMLToken)match(input,Plus,FOLLOW_Plus_in_e_num_24861); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            Plus283_tree = (ANMLToken)adaptor.create(Plus283);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(Plus283_tree, root_0);
            	            }

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:772:40: Minus
            	            {
            	            Minus284=(ANMLToken)match(input,Minus,FOLLOW_Minus_in_e_num_24864); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            Minus284_tree = (ANMLToken)adaptor.create(Minus284);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(Minus284_tree, root_0);
            	            }

            	            }
            	            break;
            	        case 3 :
            	            // ANML.g:772:47: OrBit
            	            {
            	            OrBit285=(ANMLToken)match(input,OrBit,FOLLOW_OrBit_in_e_num_24867); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            OrBit285_tree = (ANMLToken)adaptor.create(OrBit285);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(OrBit285_tree, root_0);
            	            }

            	            }
            	            break;

            	    }

            	    // ANML.g:772:55: ( ( e_prefix )=> e_prefix | e_num_3 )
            	    int alt109=2;
            	    alt109 = dfa109.predict(input);
            	    switch (alt109) {
            	        case 1 :
            	            // ANML.g:772:56: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_num_24876);
            	            e_prefix286=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix286.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:772:79: e_num_3
            	            {
            	            pushFollow(FOLLOW_e_num_3_in_e_num_24880);
            	            e_num_3287=e_num_3();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_3287.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop110;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_num_2"

    public static class e_num_3_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_num_3"
    // ANML.g:775:1: e_num_3 : e_num_4 ( ( Times | Divide | AndBit )=> ( Times | Divide | AndBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) )* ;
    public final ANMLParser.e_num_3_return e_num_3() throws RecognitionException {
        ANMLParser.e_num_3_return retval = new ANMLParser.e_num_3_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Times289=null;
        ANMLToken Divide290=null;
        ANMLToken AndBit291=null;
        ANMLParser.e_num_4_return e_num_4288 = null;

        ANMLParser.e_prefix_return e_prefix292 = null;

        ANMLParser.e_num_4_return e_num_4293 = null;


        ANMLToken Times289_tree=null;
        ANMLToken Divide290_tree=null;
        ANMLToken AndBit291_tree=null;

        try {
            // ANML.g:776:2: ( e_num_4 ( ( Times | Divide | AndBit )=> ( Times | Divide | AndBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) )* )
            // ANML.g:776:4: e_num_4 ( ( Times | Divide | AndBit )=> ( Times | Divide | AndBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) )*
            {
            root_0 = (ANMLToken)adaptor.nil();

            pushFollow(FOLLOW_e_num_4_in_e_num_34893);
            e_num_4288=e_num_4();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_4288.getTree());
            // ANML.g:777:3: ( ( Times | Divide | AndBit )=> ( Times | Divide | AndBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) )*
            loop113:
            do {
                int alt113=2;
                switch ( input.LA(1) ) {
                case Times:
                    {
                    int LA113_2 = input.LA(2);

                    if ( (synpred48_ANML()) ) {
                        alt113=1;
                    }


                    }
                    break;
                case Divide:
                    {
                    int LA113_3 = input.LA(2);

                    if ( (synpred48_ANML()) ) {
                        alt113=1;
                    }


                    }
                    break;
                case AndBit:
                    {
                    int LA113_4 = input.LA(2);

                    if ( (synpred48_ANML()) ) {
                        alt113=1;
                    }


                    }
                    break;

                }

                switch (alt113) {
            	case 1 :
            	    // ANML.g:777:4: ( Times | Divide | AndBit )=> ( Times | Divide | AndBit ) ( ( e_prefix )=> e_prefix | e_num_4 )
            	    {
            	    // ANML.g:777:27: ( Times | Divide | AndBit )
            	    int alt111=3;
            	    switch ( input.LA(1) ) {
            	    case Times:
            	        {
            	        alt111=1;
            	        }
            	        break;
            	    case Divide:
            	        {
            	        alt111=2;
            	        }
            	        break;
            	    case AndBit:
            	        {
            	        alt111=3;
            	        }
            	        break;
            	    default:
            	        if (state.backtracking>0) {state.failed=true; return retval;}
            	        NoViableAltException nvae =
            	            new NoViableAltException("", 111, 0, input);

            	        throw nvae;
            	    }

            	    switch (alt111) {
            	        case 1 :
            	            // ANML.g:777:28: Times
            	            {
            	            Times289=(ANMLToken)match(input,Times,FOLLOW_Times_in_e_num_34908); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            Times289_tree = (ANMLToken)adaptor.create(Times289);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(Times289_tree, root_0);
            	            }

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:777:35: Divide
            	            {
            	            Divide290=(ANMLToken)match(input,Divide,FOLLOW_Divide_in_e_num_34911); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            Divide290_tree = (ANMLToken)adaptor.create(Divide290);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(Divide290_tree, root_0);
            	            }

            	            }
            	            break;
            	        case 3 :
            	            // ANML.g:777:43: AndBit
            	            {
            	            AndBit291=(ANMLToken)match(input,AndBit,FOLLOW_AndBit_in_e_num_34914); if (state.failed) return retval;
            	            if ( state.backtracking==0 ) {
            	            AndBit291_tree = (ANMLToken)adaptor.create(AndBit291);
            	            root_0 = (ANMLToken)adaptor.becomeRoot(AndBit291_tree, root_0);
            	            }

            	            }
            	            break;

            	    }

            	    // ANML.g:778:4: ( ( e_prefix )=> e_prefix | e_num_4 )
            	    int alt112=2;
            	    alt112 = dfa112.predict(input);
            	    switch (alt112) {
            	        case 1 :
            	            // ANML.g:778:5: ( e_prefix )=> e_prefix
            	            {
            	            pushFollow(FOLLOW_e_prefix_in_e_num_34927);
            	            e_prefix292=e_prefix();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix292.getTree());

            	            }
            	            break;
            	        case 2 :
            	            // ANML.g:779:6: e_num_4
            	            {
            	            pushFollow(FOLLOW_e_num_4_in_e_num_34935);
            	            e_num_4293=e_num_4();

            	            state._fsp--;
            	            if (state.failed) return retval;
            	            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_4293.getTree());

            	            }
            	            break;

            	    }


            	    }
            	    break;

            	default :
            	    break loop113;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_num_3"

    public static class e_num_4_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_num_4"
    // ANML.g:784:1: e_num_4 : ( ( Minus | NotBit )=> ( Minus | NotBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) | e_atomic );
    public final ANMLParser.e_num_4_return e_num_4() throws RecognitionException {
        ANMLParser.e_num_4_return retval = new ANMLParser.e_num_4_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Minus294=null;
        ANMLToken NotBit295=null;
        ANMLParser.e_prefix_return e_prefix296 = null;

        ANMLParser.e_num_4_return e_num_4297 = null;

        ANMLParser.e_atomic_return e_atomic298 = null;


        ANMLToken Minus294_tree=null;
        ANMLToken NotBit295_tree=null;

        try {
            // ANML.g:785:2: ( ( Minus | NotBit )=> ( Minus | NotBit ) ( ( e_prefix )=> e_prefix | e_num_4 ) | e_atomic )
            int alt116=2;
            int LA116_0 = input.LA(1);

            if ( (LA116_0==Minus) && (synpred50_ANML())) {
                alt116=1;
            }
            else if ( (LA116_0==NotBit) && (synpred50_ANML())) {
                alt116=1;
            }
            else if ( ((LA116_0>=Bra && LA116_0<=Ket)||LA116_0==ID||LA116_0==LeftP||LA116_0==Duration||(LA116_0>=Unordered && LA116_0<=Ordered)||(LA116_0>=Start && LA116_0<=Infinity)) ) {
                alt116=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 116, 0, input);

                throw nvae;
            }
            switch (alt116) {
                case 1 :
                    // ANML.g:785:4: ( Minus | NotBit )=> ( Minus | NotBit ) ( ( e_prefix )=> e_prefix | e_num_4 )
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    // ANML.g:785:20: ( Minus | NotBit )
                    int alt114=2;
                    int LA114_0 = input.LA(1);

                    if ( (LA114_0==Minus) ) {
                        alt114=1;
                    }
                    else if ( (LA114_0==NotBit) ) {
                        alt114=2;
                    }
                    else {
                        if (state.backtracking>0) {state.failed=true; return retval;}
                        NoViableAltException nvae =
                            new NoViableAltException("", 114, 0, input);

                        throw nvae;
                    }
                    switch (alt114) {
                        case 1 :
                            // ANML.g:785:21: Minus
                            {
                            Minus294=(ANMLToken)match(input,Minus,FOLLOW_Minus_in_e_num_44962); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            Minus294_tree = (ANMLToken)adaptor.create(Minus294);
                            root_0 = (ANMLToken)adaptor.becomeRoot(Minus294_tree, root_0);
                            }

                            }
                            break;
                        case 2 :
                            // ANML.g:785:28: NotBit
                            {
                            NotBit295=(ANMLToken)match(input,NotBit,FOLLOW_NotBit_in_e_num_44965); if (state.failed) return retval;
                            if ( state.backtracking==0 ) {
                            NotBit295_tree = (ANMLToken)adaptor.create(NotBit295);
                            root_0 = (ANMLToken)adaptor.becomeRoot(NotBit295_tree, root_0);
                            }

                            }
                            break;

                    }

                    // ANML.g:786:3: ( ( e_prefix )=> e_prefix | e_num_4 )
                    int alt115=2;
                    alt115 = dfa115.predict(input);
                    switch (alt115) {
                        case 1 :
                            // ANML.g:786:4: ( e_prefix )=> e_prefix
                            {
                            pushFollow(FOLLOW_e_prefix_in_e_num_44977);
                            e_prefix296=e_prefix();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_prefix296.getTree());

                            }
                            break;
                        case 2 :
                            // ANML.g:787:5: e_num_4
                            {
                            pushFollow(FOLLOW_e_num_4_in_e_num_44984);
                            e_num_4297=e_num_4();

                            state._fsp--;
                            if (state.failed) return retval;
                            if ( state.backtracking==0 ) adaptor.addChild(root_0, e_num_4297.getTree());

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // ANML.g:789:4: e_atomic
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_e_atomic_in_e_num_44993);
                    e_atomic298=e_atomic();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, e_atomic298.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_num_4"

    public static class e_atomic_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "e_atomic"
    // ANML.g:792:1: e_atomic : ( '(' expr ')' | time_primitive | time_complex | literal | ref );
    public final ANMLParser.e_atomic_return e_atomic() throws RecognitionException {
        ANMLParser.e_atomic_return retval = new ANMLParser.e_atomic_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken char_literal299=null;
        ANMLToken char_literal301=null;
        ANMLParser.expr_return expr300 = null;

        ANMLParser.time_primitive_return time_primitive302 = null;

        ANMLParser.time_complex_return time_complex303 = null;

        ANMLParser.literal_return literal304 = null;

        ANMLParser.ref_return ref305 = null;


        ANMLToken char_literal299_tree=null;
        ANMLToken char_literal301_tree=null;

        try {
            // ANML.g:793:2: ( '(' expr ')' | time_primitive | time_complex | literal | ref )
            int alt117=5;
            switch ( input.LA(1) ) {
            case LeftP:
                {
                alt117=1;
                }
                break;
            case Bra:
            case Ket:
            case Duration:
            case Start:
            case End:
                {
                alt117=2;
                }
                break;
            case Unordered:
            case Ordered:
                {
                alt117=3;
                }
                break;
            case INT:
            case FLOAT:
            case STRING:
            case True:
            case False:
            case Infinity:
                {
                alt117=4;
                }
                break;
            case ID:
                {
                alt117=5;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 117, 0, input);

                throw nvae;
            }

            switch (alt117) {
                case 1 :
                    // ANML.g:793:4: '(' expr ')'
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    char_literal299=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_e_atomic5003); if (state.failed) return retval;
                    pushFollow(FOLLOW_expr_in_e_atomic5006);
                    expr300=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, expr300.getTree());
                    char_literal301=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_e_atomic5008); if (state.failed) return retval;

                    }
                    break;
                case 2 :
                    // ANML.g:794:4: time_primitive
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_time_primitive_in_e_atomic5014);
                    time_primitive302=time_primitive();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, time_primitive302.getTree());

                    }
                    break;
                case 3 :
                    // ANML.g:795:4: time_complex
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_time_complex_in_e_atomic5019);
                    time_complex303=time_complex();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, time_complex303.getTree());

                    }
                    break;
                case 4 :
                    // ANML.g:796:4: literal
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_literal_in_e_atomic5024);
                    literal304=literal();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, literal304.getTree());

                    }
                    break;
                case 5 :
                    // ANML.g:797:4: ref
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_ref_in_e_atomic5029);
                    ref305=ref();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, ref305.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "e_atomic"

    public static class time_complex_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "time_complex"
    // ANML.g:800:1: time_complex : ( Unordered | Ordered ) '(' expr ( Comma expr )* ')' ;
    public final ANMLParser.time_complex_return time_complex() throws RecognitionException {
        ANMLParser.time_complex_return retval = new ANMLParser.time_complex_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Unordered306=null;
        ANMLToken Ordered307=null;
        ANMLToken char_literal308=null;
        ANMLToken Comma310=null;
        ANMLToken char_literal312=null;
        ANMLParser.expr_return expr309 = null;

        ANMLParser.expr_return expr311 = null;


        ANMLToken Unordered306_tree=null;
        ANMLToken Ordered307_tree=null;
        ANMLToken char_literal308_tree=null;
        ANMLToken Comma310_tree=null;
        ANMLToken char_literal312_tree=null;

        try {
            // ANML.g:800:14: ( ( Unordered | Ordered ) '(' expr ( Comma expr )* ')' )
            // ANML.g:801:2: ( Unordered | Ordered ) '(' expr ( Comma expr )* ')'
            {
            root_0 = (ANMLToken)adaptor.nil();

            // ANML.g:801:2: ( Unordered | Ordered )
            int alt118=2;
            int LA118_0 = input.LA(1);

            if ( (LA118_0==Unordered) ) {
                alt118=1;
            }
            else if ( (LA118_0==Ordered) ) {
                alt118=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 118, 0, input);

                throw nvae;
            }
            switch (alt118) {
                case 1 :
                    // ANML.g:801:3: Unordered
                    {
                    Unordered306=(ANMLToken)match(input,Unordered,FOLLOW_Unordered_in_time_complex5042); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    Unordered306_tree = (ANMLToken)adaptor.create(Unordered306);
                    root_0 = (ANMLToken)adaptor.becomeRoot(Unordered306_tree, root_0);
                    }

                    }
                    break;
                case 2 :
                    // ANML.g:801:14: Ordered
                    {
                    Ordered307=(ANMLToken)match(input,Ordered,FOLLOW_Ordered_in_time_complex5045); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    Ordered307_tree = (ANMLToken)adaptor.create(Ordered307);
                    root_0 = (ANMLToken)adaptor.becomeRoot(Ordered307_tree, root_0);
                    }

                    }
                    break;

            }

            char_literal308=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_complex5049); if (state.failed) return retval;
            pushFollow(FOLLOW_expr_in_time_complex5052);
            expr309=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) adaptor.addChild(root_0, expr309.getTree());
            // ANML.g:801:34: ( Comma expr )*
            loop119:
            do {
                int alt119=2;
                int LA119_0 = input.LA(1);

                if ( (LA119_0==Comma) ) {
                    alt119=1;
                }


                switch (alt119) {
            	case 1 :
            	    // ANML.g:801:35: Comma expr
            	    {
            	    Comma310=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_time_complex5055); if (state.failed) return retval;
            	    pushFollow(FOLLOW_expr_in_time_complex5058);
            	    expr311=expr();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) adaptor.addChild(root_0, expr311.getTree());

            	    }
            	    break;

            	default :
            	    break loop119;
                }
            } while (true);

            char_literal312=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_complex5062); if (state.failed) return retval;

            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "time_complex"

    public static class ref_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "ref"
    // ANML.g:804:1: ref : (i= ID -> ^( Ref[$i,\"ReferenceID\"] $i) ) ( Dot ID -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) ) | ( arg_list )=> arg_list -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list ) )* ;
    public final ANMLParser.ref_return ref() throws RecognitionException {
        ANMLParser.ref_return retval = new ANMLParser.ref_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken i=null;
        ANMLToken Dot313=null;
        ANMLToken ID314=null;
        ANMLParser.arg_list_return arg_list315 = null;


        ANMLToken i_tree=null;
        ANMLToken Dot313_tree=null;
        ANMLToken ID314_tree=null;
        RewriteRuleTokenStream stream_Dot=new RewriteRuleTokenStream(adaptor,"token Dot");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
        RewriteRuleSubtreeStream stream_arg_list=new RewriteRuleSubtreeStream(adaptor,"rule arg_list");
        try {
            // ANML.g:805:2: ( (i= ID -> ^( Ref[$i,\"ReferenceID\"] $i) ) ( Dot ID -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) ) | ( arg_list )=> arg_list -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list ) )* )
            // ANML.g:805:4: (i= ID -> ^( Ref[$i,\"ReferenceID\"] $i) ) ( Dot ID -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) ) | ( arg_list )=> arg_list -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list ) )*
            {
            // ANML.g:805:4: (i= ID -> ^( Ref[$i,\"ReferenceID\"] $i) )
            // ANML.g:805:5: i= ID
            {
            i=(ANMLToken)match(input,ID,FOLLOW_ID_in_ref5076); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_ID.add(i);



            // AST REWRITE
            // elements: i
            // token labels: i
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleTokenStream stream_i=new RewriteRuleTokenStream(adaptor,"token i",i);
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 805:10: -> ^( Ref[$i,\"ReferenceID\"] $i)
            {
                // ANML.g:805:13: ^( Ref[$i,\"ReferenceID\"] $i)
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Ref, i, "ReferenceID"), root_1);

                adaptor.addChild(root_1, stream_i.nextNode());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            // ANML.g:806:3: ( Dot ID -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) ) | ( arg_list )=> arg_list -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list ) )*
            loop120:
            do {
                int alt120=3;
                alt120 = dfa120.predict(input);
                switch (alt120) {
            	case 1 :
            	    // ANML.g:806:5: Dot ID
            	    {
            	    Dot313=(ANMLToken)match(input,Dot,FOLLOW_Dot_in_ref5093); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_Dot.add(Dot313);

            	    ID314=(ANMLToken)match(input,ID,FOLLOW_ID_in_ref5095); if (state.failed) return retval; 
            	    if ( state.backtracking==0 ) stream_ID.add(ID314);



            	    // AST REWRITE
            	    // elements: ref, ID
            	    // token labels: 
            	    // rule labels: retval
            	    // token list labels: 
            	    // rule list labels: 
            	    if ( state.backtracking==0 ) {
            	    retval.tree = root_0;
            	    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            	    root_0 = (ANMLToken)adaptor.nil();
            	    // 807:4: -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) )
            	    {
            	        // ANML.g:807:7: ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) )
            	        {
            	        ANMLToken root_1 = (ANMLToken)adaptor.nil();
            	        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Access, Dot313, "AccessField"), root_1);

            	        adaptor.addChild(root_1, stream_retval.nextTree());
            	        // ANML.g:807:41: ^( Ref ID )
            	        {
            	        ANMLToken root_2 = (ANMLToken)adaptor.nil();
            	        root_2 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Ref, "Ref"), root_2);

            	        adaptor.addChild(root_2, stream_ID.nextNode());

            	        adaptor.addChild(root_1, root_2);
            	        }

            	        adaptor.addChild(root_0, root_1);
            	        }

            	    }

            	    retval.tree = root_0;}
            	    }
            	    break;
            	case 2 :
            	    // ANML.g:808:5: ( arg_list )=> arg_list
            	    {
            	    pushFollow(FOLLOW_arg_list_in_ref5125);
            	    arg_list315=arg_list();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_arg_list.add(arg_list315.getTree());


            	    // AST REWRITE
            	    // elements: arg_list, ref
            	    // token labels: 
            	    // rule labels: retval
            	    // token list labels: 
            	    // rule list labels: 
            	    if ( state.backtracking==0 ) {
            	    retval.tree = root_0;
            	    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            	    root_0 = (ANMLToken)adaptor.nil();
            	    // 809:4: -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list )
            	    {
            	        // ANML.g:809:7: ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list )
            	        {
            	        ANMLToken root_1 = (ANMLToken)adaptor.nil();
            	        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Bind, (arg_list315!=null?((ANMLToken)arg_list315.tree):null), "BindParameters"), root_1);

            	        adaptor.addChild(root_1, stream_retval.nextTree());
            	        adaptor.addChild(root_1, stream_arg_list.nextTree());

            	        adaptor.addChild(root_0, root_1);
            	        }

            	    }

            	    retval.tree = root_0;}
            	    }
            	    break;

            	default :
            	    break loop120;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "ref"

    public static class time_primitive_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "time_primitive"
    // ANML.g:813:1: time_primitive : ( ( Bra LeftP ID RightP )=> Bra LeftP ID RightP -> ^( LabelRef ID Bra ) | ( Start LeftP ID RightP )=> Start LeftP ID RightP -> ^( LabelRef ID Start ) | ( End LeftP ID RightP )=> End LeftP ID RightP -> ^( LabelRef ID End ) | ( Duration LeftP ID RightP )=> Duration LeftP ID RightP -> ^( LabelRef ID Duration ) | ( Ket LeftP ID RightP )=> Ket LeftP ID RightP -> ^( LabelRef ID Ket ) | Start -> ^( LabelRef This Start ) | End -> ^( LabelRef This End ) | Duration -> ^( LabelRef This Duration ) | Bra -> ^( LabelRef This Bra ) | Ket -> ^( LabelRef This Ket ) );
    public final ANMLParser.time_primitive_return time_primitive() throws RecognitionException {
        ANMLParser.time_primitive_return retval = new ANMLParser.time_primitive_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken Bra316=null;
        ANMLToken LeftP317=null;
        ANMLToken ID318=null;
        ANMLToken RightP319=null;
        ANMLToken Start320=null;
        ANMLToken LeftP321=null;
        ANMLToken ID322=null;
        ANMLToken RightP323=null;
        ANMLToken End324=null;
        ANMLToken LeftP325=null;
        ANMLToken ID326=null;
        ANMLToken RightP327=null;
        ANMLToken Duration328=null;
        ANMLToken LeftP329=null;
        ANMLToken ID330=null;
        ANMLToken RightP331=null;
        ANMLToken Ket332=null;
        ANMLToken LeftP333=null;
        ANMLToken ID334=null;
        ANMLToken RightP335=null;
        ANMLToken Start336=null;
        ANMLToken End337=null;
        ANMLToken Duration338=null;
        ANMLToken Bra339=null;
        ANMLToken Ket340=null;

        ANMLToken Bra316_tree=null;
        ANMLToken LeftP317_tree=null;
        ANMLToken ID318_tree=null;
        ANMLToken RightP319_tree=null;
        ANMLToken Start320_tree=null;
        ANMLToken LeftP321_tree=null;
        ANMLToken ID322_tree=null;
        ANMLToken RightP323_tree=null;
        ANMLToken End324_tree=null;
        ANMLToken LeftP325_tree=null;
        ANMLToken ID326_tree=null;
        ANMLToken RightP327_tree=null;
        ANMLToken Duration328_tree=null;
        ANMLToken LeftP329_tree=null;
        ANMLToken ID330_tree=null;
        ANMLToken RightP331_tree=null;
        ANMLToken Ket332_tree=null;
        ANMLToken LeftP333_tree=null;
        ANMLToken ID334_tree=null;
        ANMLToken RightP335_tree=null;
        ANMLToken Start336_tree=null;
        ANMLToken End337_tree=null;
        ANMLToken Duration338_tree=null;
        ANMLToken Bra339_tree=null;
        ANMLToken Ket340_tree=null;
        RewriteRuleTokenStream stream_RightP=new RewriteRuleTokenStream(adaptor,"token RightP");
        RewriteRuleTokenStream stream_End=new RewriteRuleTokenStream(adaptor,"token End");
        RewriteRuleTokenStream stream_Start=new RewriteRuleTokenStream(adaptor,"token Start");
        RewriteRuleTokenStream stream_Bra=new RewriteRuleTokenStream(adaptor,"token Bra");
        RewriteRuleTokenStream stream_Ket=new RewriteRuleTokenStream(adaptor,"token Ket");
        RewriteRuleTokenStream stream_Duration=new RewriteRuleTokenStream(adaptor,"token Duration");
        RewriteRuleTokenStream stream_LeftP=new RewriteRuleTokenStream(adaptor,"token LeftP");
        RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");

        try {
            // ANML.g:814:2: ( ( Bra LeftP ID RightP )=> Bra LeftP ID RightP -> ^( LabelRef ID Bra ) | ( Start LeftP ID RightP )=> Start LeftP ID RightP -> ^( LabelRef ID Start ) | ( End LeftP ID RightP )=> End LeftP ID RightP -> ^( LabelRef ID End ) | ( Duration LeftP ID RightP )=> Duration LeftP ID RightP -> ^( LabelRef ID Duration ) | ( Ket LeftP ID RightP )=> Ket LeftP ID RightP -> ^( LabelRef ID Ket ) | Start -> ^( LabelRef This Start ) | End -> ^( LabelRef This End ) | Duration -> ^( LabelRef This Duration ) | Bra -> ^( LabelRef This Bra ) | Ket -> ^( LabelRef This Ket ) )
            int alt121=10;
            alt121 = dfa121.predict(input);
            switch (alt121) {
                case 1 :
                    // ANML.g:814:4: ( Bra LeftP ID RightP )=> Bra LeftP ID RightP
                    {
                    Bra316=(ANMLToken)match(input,Bra,FOLLOW_Bra_in_time_primitive5166); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Bra.add(Bra316);

                    LeftP317=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_primitive5168); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP317);

                    ID318=(ANMLToken)match(input,ID,FOLLOW_ID_in_time_primitive5170); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID318);

                    RightP319=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_primitive5172); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP319);



                    // AST REWRITE
                    // elements: ID, Bra
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 815:6: -> ^( LabelRef ID Bra )
                    {
                        // ANML.g:815:9: ^( LabelRef ID Bra )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_Bra.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 2 :
                    // ANML.g:816:4: ( Start LeftP ID RightP )=> Start LeftP ID RightP
                    {
                    Start320=(ANMLToken)match(input,Start,FOLLOW_Start_in_time_primitive5203); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Start.add(Start320);

                    LeftP321=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_primitive5205); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP321);

                    ID322=(ANMLToken)match(input,ID,FOLLOW_ID_in_time_primitive5207); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID322);

                    RightP323=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_primitive5209); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP323);



                    // AST REWRITE
                    // elements: Start, ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 817:6: -> ^( LabelRef ID Start )
                    {
                        // ANML.g:817:9: ^( LabelRef ID Start )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_Start.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 3 :
                    // ANML.g:818:4: ( End LeftP ID RightP )=> End LeftP ID RightP
                    {
                    End324=(ANMLToken)match(input,End,FOLLOW_End_in_time_primitive5240); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_End.add(End324);

                    LeftP325=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_primitive5242); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP325);

                    ID326=(ANMLToken)match(input,ID,FOLLOW_ID_in_time_primitive5244); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID326);

                    RightP327=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_primitive5246); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP327);



                    // AST REWRITE
                    // elements: End, ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 819:3: -> ^( LabelRef ID End )
                    {
                        // ANML.g:819:6: ^( LabelRef ID End )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_End.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 4 :
                    // ANML.g:820:4: ( Duration LeftP ID RightP )=> Duration LeftP ID RightP
                    {
                    Duration328=(ANMLToken)match(input,Duration,FOLLOW_Duration_in_time_primitive5274); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Duration.add(Duration328);

                    LeftP329=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_primitive5276); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP329);

                    ID330=(ANMLToken)match(input,ID,FOLLOW_ID_in_time_primitive5278); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID330);

                    RightP331=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_primitive5280); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP331);



                    // AST REWRITE
                    // elements: Duration, ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 821:3: -> ^( LabelRef ID Duration )
                    {
                        // ANML.g:821:6: ^( LabelRef ID Duration )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_Duration.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 5 :
                    // ANML.g:822:4: ( Ket LeftP ID RightP )=> Ket LeftP ID RightP
                    {
                    Ket332=(ANMLToken)match(input,Ket,FOLLOW_Ket_in_time_primitive5308); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Ket.add(Ket332);

                    LeftP333=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_time_primitive5310); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_LeftP.add(LeftP333);

                    ID334=(ANMLToken)match(input,ID,FOLLOW_ID_in_time_primitive5312); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_ID.add(ID334);

                    RightP335=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_time_primitive5314); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_RightP.add(RightP335);



                    // AST REWRITE
                    // elements: Ket, ID
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 823:6: -> ^( LabelRef ID Ket )
                    {
                        // ANML.g:823:9: ^( LabelRef ID Ket )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, stream_ID.nextNode());
                        adaptor.addChild(root_1, stream_Ket.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 6 :
                    // ANML.g:824:4: Start
                    {
                    Start336=(ANMLToken)match(input,Start,FOLLOW_Start_in_time_primitive5334); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Start.add(Start336);



                    // AST REWRITE
                    // elements: Start
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 825:6: -> ^( LabelRef This Start )
                    {
                        // ANML.g:825:9: ^( LabelRef This Start )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(This, "This"));
                        adaptor.addChild(root_1, stream_Start.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 7 :
                    // ANML.g:826:4: End
                    {
                    End337=(ANMLToken)match(input,End,FOLLOW_End_in_time_primitive5354); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_End.add(End337);



                    // AST REWRITE
                    // elements: End
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 827:6: -> ^( LabelRef This End )
                    {
                        // ANML.g:827:9: ^( LabelRef This End )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(This, "This"));
                        adaptor.addChild(root_1, stream_End.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 8 :
                    // ANML.g:828:4: Duration
                    {
                    Duration338=(ANMLToken)match(input,Duration,FOLLOW_Duration_in_time_primitive5374); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Duration.add(Duration338);



                    // AST REWRITE
                    // elements: Duration
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 829:6: -> ^( LabelRef This Duration )
                    {
                        // ANML.g:829:9: ^( LabelRef This Duration )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(This, "This"));
                        adaptor.addChild(root_1, stream_Duration.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 9 :
                    // ANML.g:830:4: Bra
                    {
                    Bra339=(ANMLToken)match(input,Bra,FOLLOW_Bra_in_time_primitive5394); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Bra.add(Bra339);



                    // AST REWRITE
                    // elements: Bra
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 831:6: -> ^( LabelRef This Bra )
                    {
                        // ANML.g:831:9: ^( LabelRef This Bra )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(This, "This"));
                        adaptor.addChild(root_1, stream_Bra.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;
                case 10 :
                    // ANML.g:832:4: Ket
                    {
                    Ket340=(ANMLToken)match(input,Ket,FOLLOW_Ket_in_time_primitive5414); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Ket.add(Ket340);



                    // AST REWRITE
                    // elements: Ket
                    // token labels: 
                    // rule labels: retval
                    // token list labels: 
                    // rule list labels: 
                    if ( state.backtracking==0 ) {
                    retval.tree = root_0;
                    RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

                    root_0 = (ANMLToken)adaptor.nil();
                    // 833:6: -> ^( LabelRef This Ket )
                    {
                        // ANML.g:833:9: ^( LabelRef This Ket )
                        {
                        ANMLToken root_1 = (ANMLToken)adaptor.nil();
                        root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(LabelRef, "LabelRef"), root_1);

                        adaptor.addChild(root_1, (ANMLToken)adaptor.create(This, "This"));
                        adaptor.addChild(root_1, stream_Ket.nextNode());

                        adaptor.addChild(root_0, root_1);
                        }

                    }

                    retval.tree = root_0;}
                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "time_primitive"

    public static class set_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "set"
    // ANML.g:836:1: set : ( enumeration | range );
    public final ANMLParser.set_return set() throws RecognitionException {
        ANMLParser.set_return retval = new ANMLParser.set_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLParser.enumeration_return enumeration341 = null;

        ANMLParser.range_return range342 = null;



        try {
            // ANML.g:836:4: ( enumeration | range )
            int alt122=2;
            int LA122_0 = input.LA(1);

            if ( (LA122_0==LeftC) ) {
                alt122=1;
            }
            else if ( (LA122_0==LeftB) ) {
                alt122=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 122, 0, input);

                throw nvae;
            }
            switch (alt122) {
                case 1 :
                    // ANML.g:836:6: enumeration
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_enumeration_in_set5438);
                    enumeration341=enumeration();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, enumeration341.getTree());

                    }
                    break;
                case 2 :
                    // ANML.g:836:20: range
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_range_in_set5442);
                    range342=range();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, range342.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "set"

    public static class enumeration_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "enumeration"
    // ANML.g:838:1: enumeration : LeftC expr ( ( Comma )? expr )* RightC -> ^( Enum[$LeftC,\"Enumeration\"] ( expr )+ ) ;
    public final ANMLParser.enumeration_return enumeration() throws RecognitionException {
        ANMLParser.enumeration_return retval = new ANMLParser.enumeration_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftC343=null;
        ANMLToken Comma345=null;
        ANMLToken RightC347=null;
        ANMLParser.expr_return expr344 = null;

        ANMLParser.expr_return expr346 = null;


        ANMLToken LeftC343_tree=null;
        ANMLToken Comma345_tree=null;
        ANMLToken RightC347_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        try {
            // ANML.g:838:12: ( LeftC expr ( ( Comma )? expr )* RightC -> ^( Enum[$LeftC,\"Enumeration\"] ( expr )+ ) )
            // ANML.g:839:2: LeftC expr ( ( Comma )? expr )* RightC
            {
            LeftC343=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_enumeration5451); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftC.add(LeftC343);

            pushFollow(FOLLOW_expr_in_enumeration5453);
            expr344=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_expr.add(expr344.getTree());
            // ANML.g:839:13: ( ( Comma )? expr )*
            loop124:
            do {
                int alt124=2;
                int LA124_0 = input.LA(1);

                if ( ((LA124_0>=Bra && LA124_0<=Ket)||LA124_0==ID||LA124_0==Comma||LA124_0==LeftP||(LA124_0>=NotLog && LA124_0<=NotBit)||(LA124_0>=LeftB && LA124_0<=Duration)||LA124_0==Contains||(LA124_0>=ForAll && LA124_0<=Exists)||LA124_0==Dots||LA124_0==Minus||(LA124_0>=Unordered && LA124_0<=Ordered)||(LA124_0>=Start && LA124_0<=Infinity)) ) {
                    alt124=1;
                }


                switch (alt124) {
            	case 1 :
            	    // ANML.g:839:14: ( Comma )? expr
            	    {
            	    // ANML.g:839:14: ( Comma )?
            	    int alt123=2;
            	    int LA123_0 = input.LA(1);

            	    if ( (LA123_0==Comma) ) {
            	        alt123=1;
            	    }
            	    switch (alt123) {
            	        case 1 :
            	            // ANML.g:839:14: Comma
            	            {
            	            Comma345=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_enumeration5456); if (state.failed) return retval; 
            	            if ( state.backtracking==0 ) stream_Comma.add(Comma345);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_expr_in_enumeration5459);
            	    expr346=expr();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_expr.add(expr346.getTree());

            	    }
            	    break;

            	default :
            	    break loop124;
                }
            } while (true);

            RightC347=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_enumeration5463); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightC.add(RightC347);



            // AST REWRITE
            // elements: expr
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 839:35: -> ^( Enum[$LeftC,\"Enumeration\"] ( expr )+ )
            {
                // ANML.g:839:38: ^( Enum[$LeftC,\"Enumeration\"] ( expr )+ )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Enum, LeftC343, "Enumeration"), root_1);

                if ( !(stream_expr.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_expr.hasNext() ) {
                    adaptor.addChild(root_1, stream_expr.nextTree());

                }
                stream_expr.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "enumeration"

    public static class range_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "range"
    // ANML.g:842:1: range : LeftB a= expr ( Comma )? b= expr RightB -> ^( Range[$LeftB,\"Range\"] $a $b) ;
    public final ANMLParser.range_return range() throws RecognitionException {
        ANMLParser.range_return retval = new ANMLParser.range_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftB348=null;
        ANMLToken Comma349=null;
        ANMLToken RightB350=null;
        ANMLParser.expr_return a = null;

        ANMLParser.expr_return b = null;


        ANMLToken LeftB348_tree=null;
        ANMLToken Comma349_tree=null;
        ANMLToken RightB350_tree=null;
        RewriteRuleTokenStream stream_RightB=new RewriteRuleTokenStream(adaptor,"token RightB");
        RewriteRuleTokenStream stream_LeftB=new RewriteRuleTokenStream(adaptor,"token LeftB");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        try {
            // ANML.g:842:6: ( LeftB a= expr ( Comma )? b= expr RightB -> ^( Range[$LeftB,\"Range\"] $a $b) )
            // ANML.g:843:4: LeftB a= expr ( Comma )? b= expr RightB
            {
            LeftB348=(ANMLToken)match(input,LeftB,FOLLOW_LeftB_in_range5485); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftB.add(LeftB348);

            pushFollow(FOLLOW_expr_in_range5489);
            a=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_expr.add(a.getTree());
            // ANML.g:843:17: ( Comma )?
            int alt125=2;
            int LA125_0 = input.LA(1);

            if ( (LA125_0==Comma) ) {
                alt125=1;
            }
            switch (alt125) {
                case 1 :
                    // ANML.g:843:17: Comma
                    {
                    Comma349=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_range5491); if (state.failed) return retval; 
                    if ( state.backtracking==0 ) stream_Comma.add(Comma349);


                    }
                    break;

            }

            pushFollow(FOLLOW_expr_in_range5496);
            b=expr();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_expr.add(b.getTree());
            RightB350=(ANMLToken)match(input,RightB,FOLLOW_RightB_in_range5498); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightB.add(RightB350);



            // AST REWRITE
            // elements: a, b
            // token labels: 
            // rule labels: retval, b, a
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);
            RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"token b",b!=null?b.tree:null);
            RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"token a",a!=null?a.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 843:38: -> ^( Range[$LeftB,\"Range\"] $a $b)
            {
                // ANML.g:843:41: ^( Range[$LeftB,\"Range\"] $a $b)
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Range, LeftB348, "Range"), root_1);

                adaptor.addChild(root_1, stream_a.nextTree());
                adaptor.addChild(root_1, stream_b.nextTree());

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "range"

    public static class type_enumeration_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_enumeration"
    // ANML.g:846:1: type_enumeration : LeftC type_enumeration_element ( ( Comma )? type_enumeration_element )* RightC -> ^( Enum[$LeftC,\"TypeElementEnumeration\"] ( type_enumeration_element )+ ) ;
    public final ANMLParser.type_enumeration_return type_enumeration() throws RecognitionException {
        ANMLParser.type_enumeration_return retval = new ANMLParser.type_enumeration_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftC351=null;
        ANMLToken Comma353=null;
        ANMLToken RightC355=null;
        ANMLParser.type_enumeration_element_return type_enumeration_element352 = null;

        ANMLParser.type_enumeration_element_return type_enumeration_element354 = null;


        ANMLToken LeftC351_tree=null;
        ANMLToken Comma353_tree=null;
        ANMLToken RightC355_tree=null;
        RewriteRuleTokenStream stream_LeftC=new RewriteRuleTokenStream(adaptor,"token LeftC");
        RewriteRuleTokenStream stream_RightC=new RewriteRuleTokenStream(adaptor,"token RightC");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_type_enumeration_element=new RewriteRuleSubtreeStream(adaptor,"rule type_enumeration_element");
        try {
            // ANML.g:846:17: ( LeftC type_enumeration_element ( ( Comma )? type_enumeration_element )* RightC -> ^( Enum[$LeftC,\"TypeElementEnumeration\"] ( type_enumeration_element )+ ) )
            // ANML.g:847:2: LeftC type_enumeration_element ( ( Comma )? type_enumeration_element )* RightC
            {
            LeftC351=(ANMLToken)match(input,LeftC,FOLLOW_LeftC_in_type_enumeration5522); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftC.add(LeftC351);

            pushFollow(FOLLOW_type_enumeration_element_in_type_enumeration5524);
            type_enumeration_element352=type_enumeration_element();

            state._fsp--;
            if (state.failed) return retval;
            if ( state.backtracking==0 ) stream_type_enumeration_element.add(type_enumeration_element352.getTree());
            // ANML.g:847:33: ( ( Comma )? type_enumeration_element )*
            loop127:
            do {
                int alt127=2;
                int LA127_0 = input.LA(1);

                if ( (LA127_0==ID||LA127_0==Comma||(LA127_0>=INT && LA127_0<=Infinity)) ) {
                    alt127=1;
                }


                switch (alt127) {
            	case 1 :
            	    // ANML.g:847:34: ( Comma )? type_enumeration_element
            	    {
            	    // ANML.g:847:34: ( Comma )?
            	    int alt126=2;
            	    int LA126_0 = input.LA(1);

            	    if ( (LA126_0==Comma) ) {
            	        alt126=1;
            	    }
            	    switch (alt126) {
            	        case 1 :
            	            // ANML.g:847:34: Comma
            	            {
            	            Comma353=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_type_enumeration5527); if (state.failed) return retval; 
            	            if ( state.backtracking==0 ) stream_Comma.add(Comma353);


            	            }
            	            break;

            	    }

            	    pushFollow(FOLLOW_type_enumeration_element_in_type_enumeration5530);
            	    type_enumeration_element354=type_enumeration_element();

            	    state._fsp--;
            	    if (state.failed) return retval;
            	    if ( state.backtracking==0 ) stream_type_enumeration_element.add(type_enumeration_element354.getTree());

            	    }
            	    break;

            	default :
            	    break loop127;
                }
            } while (true);

            RightC355=(ANMLToken)match(input,RightC,FOLLOW_RightC_in_type_enumeration5534); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightC.add(RightC355);



            // AST REWRITE
            // elements: type_enumeration_element
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 848:2: -> ^( Enum[$LeftC,\"TypeElementEnumeration\"] ( type_enumeration_element )+ )
            {
                // ANML.g:848:5: ^( Enum[$LeftC,\"TypeElementEnumeration\"] ( type_enumeration_element )+ )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Enum, LeftC351, "TypeElementEnumeration"), root_1);

                if ( !(stream_type_enumeration_element.hasNext()) ) {
                    throw new RewriteEarlyExitException();
                }
                while ( stream_type_enumeration_element.hasNext() ) {
                    adaptor.addChild(root_1, stream_type_enumeration_element.nextTree());

                }
                stream_type_enumeration_element.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_enumeration"

    public static class type_enumeration_element_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "type_enumeration_element"
    // ANML.g:852:1: type_enumeration_element : ( ID | literal );
    public final ANMLParser.type_enumeration_element_return type_enumeration_element() throws RecognitionException {
        ANMLParser.type_enumeration_element_return retval = new ANMLParser.type_enumeration_element_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken ID356=null;
        ANMLParser.literal_return literal357 = null;


        ANMLToken ID356_tree=null;

        try {
            // ANML.g:852:25: ( ID | literal )
            int alt128=2;
            int LA128_0 = input.LA(1);

            if ( (LA128_0==ID) ) {
                alt128=1;
            }
            else if ( ((LA128_0>=INT && LA128_0<=Infinity)) ) {
                alt128=2;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                NoViableAltException nvae =
                    new NoViableAltException("", 128, 0, input);

                throw nvae;
            }
            switch (alt128) {
                case 1 :
                    // ANML.g:853:2: ID
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    ID356=(ANMLToken)match(input,ID,FOLLOW_ID_in_type_enumeration_element5559); if (state.failed) return retval;
                    if ( state.backtracking==0 ) {
                    ID356_tree = (ANMLToken)adaptor.create(ID356);
                    adaptor.addChild(root_0, ID356_tree);
                    }

                    }
                    break;
                case 2 :
                    // ANML.g:853:7: literal
                    {
                    root_0 = (ANMLToken)adaptor.nil();

                    pushFollow(FOLLOW_literal_in_type_enumeration_element5563);
                    literal357=literal();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) adaptor.addChild(root_0, literal357.getTree());

                    }
                    break;

            }
            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "type_enumeration_element"

    public static class arg_list_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "arg_list"
    // ANML.g:857:1: arg_list : LeftP ( expr ( ( Comma )? expr )* )? RightP -> ^( Arguments[$LeftP,\"Arguments\"] ( expr )* ) ;
    public final ANMLParser.arg_list_return arg_list() throws RecognitionException {
        ANMLParser.arg_list_return retval = new ANMLParser.arg_list_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken LeftP358=null;
        ANMLToken Comma360=null;
        ANMLToken RightP362=null;
        ANMLParser.expr_return expr359 = null;

        ANMLParser.expr_return expr361 = null;


        ANMLToken LeftP358_tree=null;
        ANMLToken Comma360_tree=null;
        ANMLToken RightP362_tree=null;
        RewriteRuleTokenStream stream_RightP=new RewriteRuleTokenStream(adaptor,"token RightP");
        RewriteRuleTokenStream stream_LeftP=new RewriteRuleTokenStream(adaptor,"token LeftP");
        RewriteRuleTokenStream stream_Comma=new RewriteRuleTokenStream(adaptor,"token Comma");
        RewriteRuleSubtreeStream stream_expr=new RewriteRuleSubtreeStream(adaptor,"rule expr");
        try {
            // ANML.g:857:10: ( LeftP ( expr ( ( Comma )? expr )* )? RightP -> ^( Arguments[$LeftP,\"Arguments\"] ( expr )* ) )
            // ANML.g:858:4: LeftP ( expr ( ( Comma )? expr )* )? RightP
            {
            LeftP358=(ANMLToken)match(input,LeftP,FOLLOW_LeftP_in_arg_list5576); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_LeftP.add(LeftP358);

            // ANML.g:858:10: ( expr ( ( Comma )? expr )* )?
            int alt131=2;
            int LA131_0 = input.LA(1);

            if ( ((LA131_0>=Bra && LA131_0<=Ket)||LA131_0==ID||LA131_0==LeftP||(LA131_0>=NotLog && LA131_0<=NotBit)||(LA131_0>=LeftB && LA131_0<=Duration)||LA131_0==Contains||(LA131_0>=ForAll && LA131_0<=Exists)||LA131_0==Dots||LA131_0==Minus||(LA131_0>=Unordered && LA131_0<=Ordered)||(LA131_0>=Start && LA131_0<=Infinity)) ) {
                alt131=1;
            }
            switch (alt131) {
                case 1 :
                    // ANML.g:858:11: expr ( ( Comma )? expr )*
                    {
                    pushFollow(FOLLOW_expr_in_arg_list5579);
                    expr359=expr();

                    state._fsp--;
                    if (state.failed) return retval;
                    if ( state.backtracking==0 ) stream_expr.add(expr359.getTree());
                    // ANML.g:858:16: ( ( Comma )? expr )*
                    loop130:
                    do {
                        int alt130=2;
                        int LA130_0 = input.LA(1);

                        if ( ((LA130_0>=Bra && LA130_0<=Ket)||LA130_0==ID||LA130_0==Comma||LA130_0==LeftP||(LA130_0>=NotLog && LA130_0<=NotBit)||(LA130_0>=LeftB && LA130_0<=Duration)||LA130_0==Contains||(LA130_0>=ForAll && LA130_0<=Exists)||LA130_0==Dots||LA130_0==Minus||(LA130_0>=Unordered && LA130_0<=Ordered)||(LA130_0>=Start && LA130_0<=Infinity)) ) {
                            alt130=1;
                        }


                        switch (alt130) {
                    	case 1 :
                    	    // ANML.g:858:17: ( Comma )? expr
                    	    {
                    	    // ANML.g:858:17: ( Comma )?
                    	    int alt129=2;
                    	    int LA129_0 = input.LA(1);

                    	    if ( (LA129_0==Comma) ) {
                    	        alt129=1;
                    	    }
                    	    switch (alt129) {
                    	        case 1 :
                    	            // ANML.g:858:17: Comma
                    	            {
                    	            Comma360=(ANMLToken)match(input,Comma,FOLLOW_Comma_in_arg_list5582); if (state.failed) return retval; 
                    	            if ( state.backtracking==0 ) stream_Comma.add(Comma360);


                    	            }
                    	            break;

                    	    }

                    	    pushFollow(FOLLOW_expr_in_arg_list5585);
                    	    expr361=expr();

                    	    state._fsp--;
                    	    if (state.failed) return retval;
                    	    if ( state.backtracking==0 ) stream_expr.add(expr361.getTree());

                    	    }
                    	    break;

                    	default :
                    	    break loop130;
                        }
                    } while (true);


                    }
                    break;

            }

            RightP362=(ANMLToken)match(input,RightP,FOLLOW_RightP_in_arg_list5591); if (state.failed) return retval; 
            if ( state.backtracking==0 ) stream_RightP.add(RightP362);



            // AST REWRITE
            // elements: expr
            // token labels: 
            // rule labels: retval
            // token list labels: 
            // rule list labels: 
            if ( state.backtracking==0 ) {
            retval.tree = root_0;
            RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"token retval",retval!=null?retval.tree:null);

            root_0 = (ANMLToken)adaptor.nil();
            // 858:40: -> ^( Arguments[$LeftP,\"Arguments\"] ( expr )* )
            {
                // ANML.g:858:43: ^( Arguments[$LeftP,\"Arguments\"] ( expr )* )
                {
                ANMLToken root_1 = (ANMLToken)adaptor.nil();
                root_1 = (ANMLToken)adaptor.becomeRoot((ANMLToken)adaptor.create(Arguments, LeftP358, "Arguments"), root_1);

                // ANML.g:858:75: ( expr )*
                while ( stream_expr.hasNext() ) {
                    adaptor.addChild(root_1, stream_expr.nextTree());

                }
                stream_expr.reset();

                adaptor.addChild(root_0, root_1);
                }

            }

            retval.tree = root_0;}
            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "arg_list"

    public static class literal_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "literal"
    // ANML.g:863:1: literal : ( INT | FLOAT | STRING | True | False | Infinity );
    public final ANMLParser.literal_return literal() throws RecognitionException {
        ANMLParser.literal_return retval = new ANMLParser.literal_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken set363=null;

        ANMLToken set363_tree=null;

        try {
            // ANML.g:864:2: ( INT | FLOAT | STRING | True | False | Infinity )
            // ANML.g:
            {
            root_0 = (ANMLToken)adaptor.nil();

            set363=(ANMLToken)input.LT(1);
            if ( (input.LA(1)>=INT && input.LA(1)<=Infinity) ) {
                input.consume();
                if ( state.backtracking==0 ) adaptor.addChild(root_0, (ANMLToken)adaptor.create(set363));
                state.errorRecovery=false;state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "literal"

    public static class num_relop_return extends ParserRuleReturnScope {
        ANMLToken tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start "num_relop"
    // ANML.g:877:1: num_relop : ( Equal | NotEqual | LessThan | GreaterThan | LessThanE | GreaterThanE );
    public final ANMLParser.num_relop_return num_relop() throws RecognitionException {
        ANMLParser.num_relop_return retval = new ANMLParser.num_relop_return();
        retval.start = input.LT(1);

        ANMLToken root_0 = null;

        ANMLToken set364=null;

        ANMLToken set364_tree=null;

        try {
            // ANML.g:877:11: ( Equal | NotEqual | LessThan | GreaterThan | LessThanE | GreaterThanE )
            // ANML.g:
            {
            root_0 = (ANMLToken)adaptor.nil();

            set364=(ANMLToken)input.LT(1);
            if ( input.LA(1)==LessThan||input.LA(1)==Equal||(input.LA(1)>=NotEqual && input.LA(1)<=GreaterThanE) ) {
                input.consume();
                if ( state.backtracking==0 ) adaptor.addChild(root_0, (ANMLToken)adaptor.create(set364));
                state.errorRecovery=false;state.failed=false;
            }
            else {
                if (state.backtracking>0) {state.failed=true; return retval;}
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

            retval.stop = input.LT(-1);

            if ( state.backtracking==0 ) {

            retval.tree = (ANMLToken)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (ANMLToken)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "num_relop"

    // $ANTLR start synpred1_ANML
    public final void synpred1_ANML_fragment() throws RecognitionException {   
        // ANML.g:339:4: ( ref Semi )
        // ANML.g:339:5: ref Semi
        {
        pushFollow(FOLLOW_ref_in_synpred1_ANML1528);
        ref();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred1_ANML1530); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred1_ANML

    // $ANTLR start synpred2_ANML
    public final void synpred2_ANML_fragment() throws RecognitionException {   
        // ANML.g:341:4: ( ( NotLog | NotBit ) ref Semi )
        // ANML.g:341:5: ( NotLog | NotBit ) ref Semi
        {
        if ( (input.LA(1)>=NotLog && input.LA(1)<=NotBit) ) {
            input.consume();
            state.errorRecovery=false;state.failed=false;
        }
        else {
            if (state.backtracking>0) {state.failed=true; return ;}
            MismatchedSetException mse = new MismatchedSetException(null,input);
            throw mse;
        }

        pushFollow(FOLLOW_ref_in_synpred2_ANML1578);
        ref();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred2_ANML1580); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred2_ANML

    // $ANTLR start synpred3_ANML
    public final void synpred3_ANML_fragment() throws RecognitionException {   
        // ANML.g:519:4: ( stmt_primitive )
        // ANML.g:519:5: stmt_primitive
        {
        pushFollow(FOLLOW_stmt_primitive_in_synpred3_ANML2624);
        stmt_primitive();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred3_ANML

    // $ANTLR start synpred4_ANML
    public final void synpred4_ANML_fragment() throws RecognitionException {   
        // ANML.g:520:4: ( stmt_block )
        // ANML.g:520:5: stmt_block
        {
        pushFollow(FOLLOW_stmt_block_in_synpred4_ANML2634);
        stmt_block();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred4_ANML

    // $ANTLR start synpred5_ANML
    public final void synpred5_ANML_fragment() throws RecognitionException {   
        // ANML.g:521:4: ( stmt_timed )
        // ANML.g:521:5: stmt_timed
        {
        pushFollow(FOLLOW_stmt_timed_in_synpred5_ANML2644);
        stmt_timed();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred5_ANML

    // $ANTLR start synpred6_ANML
    public final void synpred6_ANML_fragment() throws RecognitionException {   
        // ANML.g:530:4: ( exist_time stmt )
        // ANML.g:530:5: exist_time stmt
        {
        pushFollow(FOLLOW_exist_time_in_synpred6_ANML2685);
        exist_time();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_stmt_in_synpred6_ANML2687);
        stmt();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred6_ANML

    // $ANTLR start synpred7_ANML
    public final void synpred7_ANML_fragment() throws RecognitionException {   
        // ANML.g:539:5: ( Else )
        // ANML.g:539:6: Else
        {
        match(input,Else,FOLLOW_Else_in_synpred7_ANML2753); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred7_ANML

    // $ANTLR start synpred8_ANML
    public final void synpred8_ANML_fragment() throws RecognitionException {   
        // ANML.g:562:4: ( expr Semi )
        // ANML.g:562:5: expr Semi
        {
        pushFollow(FOLLOW_expr_in_synpred8_ANML2893);
        expr();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred8_ANML2895); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred8_ANML

    // $ANTLR start synpred9_ANML
    public final void synpred9_ANML_fragment() throws RecognitionException {   
        // ANML.g:563:6: ( stmt_chain Semi )
        // ANML.g:563:7: stmt_chain Semi
        {
        pushFollow(FOLLOW_stmt_chain_in_synpred9_ANML2910);
        stmt_chain();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred9_ANML2912); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred9_ANML

    // $ANTLR start synpred10_ANML
    public final void synpred10_ANML_fragment() throws RecognitionException {   
        // ANML.g:564:4: ( stmt_delta_chain Semi )
        // ANML.g:564:5: stmt_delta_chain Semi
        {
        pushFollow(FOLLOW_stmt_delta_chain_in_synpred10_ANML2925);
        stmt_delta_chain();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred10_ANML2927); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred10_ANML

    // $ANTLR start synpred11_ANML
    public final void synpred11_ANML_fragment() throws RecognitionException {   
        // ANML.g:565:6: ( stmt_timeless Semi )
        // ANML.g:565:7: stmt_timeless Semi
        {
        pushFollow(FOLLOW_stmt_timeless_in_synpred11_ANML2942);
        stmt_timeless();

        state._fsp--;
        if (state.failed) return ;
        match(input,Semi,FOLLOW_Semi_in_synpred11_ANML2944); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred11_ANML

    // $ANTLR start synpred12_ANML
    public final void synpred12_ANML_fragment() throws RecognitionException {   
        // ANML.g:572:4: ( interval ref ( stmt_chain_1 )+ )
        // ANML.g:572:5: interval ref ( stmt_chain_1 )+
        {
        pushFollow(FOLLOW_interval_in_synpred12_ANML3034);
        interval();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_ref_in_synpred12_ANML3036);
        ref();

        state._fsp--;
        if (state.failed) return ;
        // ANML.g:572:18: ( stmt_chain_1 )+
        int cnt132=0;
        loop132:
        do {
            int alt132=2;
            int LA132_0 = input.LA(1);

            if ( ((LA132_0>=LessThan && LA132_0<=Assign)||LA132_0==Comma||LA132_0==Undefine||LA132_0==Equal||(LA132_0>=Change && LA132_0<=Skip)||(LA132_0>=NotEqual && LA132_0<=GreaterThanE)) ) {
                alt132=1;
            }


            switch (alt132) {
        	case 1 :
        	    // ANML.g:572:18: stmt_chain_1
        	    {
        	    pushFollow(FOLLOW_stmt_chain_1_in_synpred12_ANML3038);
        	    stmt_chain_1();

        	    state._fsp--;
        	    if (state.failed) return ;

        	    }
        	    break;

        	default :
        	    if ( cnt132 >= 1 ) break loop132;
        	    if (state.backtracking>0) {state.failed=true; return ;}
                    EarlyExitException eee =
                        new EarlyExitException(132, input);
                    throw eee;
            }
            cnt132++;
        } while (true);


        }
    }
    // $ANTLR end synpred12_ANML

    // $ANTLR start synpred13_ANML
    public final void synpred13_ANML_fragment() throws RecognitionException {   
        // ANML.g:601:4: ( interval ref ( stmt_delta_chain_1 )+ )
        // ANML.g:601:5: interval ref ( stmt_delta_chain_1 )+
        {
        pushFollow(FOLLOW_interval_in_synpred13_ANML3452);
        interval();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_ref_in_synpred13_ANML3454);
        ref();

        state._fsp--;
        if (state.failed) return ;
        // ANML.g:601:18: ( stmt_delta_chain_1 )+
        int cnt133=0;
        loop133:
        do {
            int alt133=2;
            int LA133_0 = input.LA(1);

            if ( (LA133_0==Assign||LA133_0==Comma||LA133_0==Undefine||LA133_0==Equal||LA133_0==Change||(LA133_0>=SetAssign && LA133_0<=Skip)) ) {
                alt133=1;
            }


            switch (alt133) {
        	case 1 :
        	    // ANML.g:601:18: stmt_delta_chain_1
        	    {
        	    pushFollow(FOLLOW_stmt_delta_chain_1_in_synpred13_ANML3456);
        	    stmt_delta_chain_1();

        	    state._fsp--;
        	    if (state.failed) return ;

        	    }
        	    break;

        	default :
        	    if ( cnt133 >= 1 ) break loop133;
        	    if (state.backtracking>0) {state.failed=true; return ;}
                    EarlyExitException eee =
                        new EarlyExitException(133, input);
                    throw eee;
            }
            cnt133++;
        } while (true);


        }
    }
    // $ANTLR end synpred13_ANML

    // $ANTLR start synpred14_ANML
    public final void synpred14_ANML_fragment() throws RecognitionException {   
        // ANML.g:629:4: ( univ_time )
        // ANML.g:629:5: univ_time
        {
        pushFollow(FOLLOW_univ_time_in_synpred14_ANML3664);
        univ_time();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred14_ANML

    // $ANTLR start synpred15_ANML
    public final void synpred15_ANML_fragment() throws RecognitionException {   
        // ANML.g:630:4: ( exist_time )
        // ANML.g:630:5: exist_time
        {
        pushFollow(FOLLOW_exist_time_in_synpred15_ANML3673);
        exist_time();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred15_ANML

    // $ANTLR start synpred16_ANML
    public final void synpred16_ANML_fragment() throws RecognitionException {   
        // ANML.g:639:4: ( bra All ket )
        // ANML.g:639:5: bra All ket
        {
        pushFollow(FOLLOW_bra_in_synpred16_ANML3694);
        bra();

        state._fsp--;
        if (state.failed) return ;
        match(input,All,FOLLOW_All_in_synpred16_ANML3696); if (state.failed) return ;
        pushFollow(FOLLOW_ket_in_synpred16_ANML3698);
        ket();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred16_ANML

    // $ANTLR start synpred17_ANML
    public final void synpred17_ANML_fragment() throws RecognitionException {   
        // ANML.g:641:4: ( LeftB expr RightB )
        // ANML.g:641:5: LeftB expr RightB
        {
        match(input,LeftB,FOLLOW_LeftB_in_synpred17_ANML3746); if (state.failed) return ;
        pushFollow(FOLLOW_expr_in_synpred17_ANML3748);
        expr();

        state._fsp--;
        if (state.failed) return ;
        match(input,RightB,FOLLOW_RightB_in_synpred17_ANML3750); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred17_ANML

    // $ANTLR start synpred18_ANML
    public final void synpred18_ANML_fragment() throws RecognitionException {   
        // ANML.g:657:4: ( LeftB Skip RightB )
        // ANML.g:657:5: LeftB Skip RightB
        {
        match(input,LeftB,FOLLOW_LeftB_in_synpred18_ANML3937); if (state.failed) return ;
        match(input,Skip,FOLLOW_Skip_in_synpred18_ANML3939); if (state.failed) return ;
        match(input,RightB,FOLLOW_RightB_in_synpred18_ANML3941); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred18_ANML

    // $ANTLR start synpred19_ANML
    public final void synpred19_ANML_fragment() throws RecognitionException {   
        // ANML.g:658:4: ( bra expr rLimit )
        // ANML.g:658:5: bra expr rLimit
        {
        pushFollow(FOLLOW_bra_in_synpred19_ANML3961);
        bra();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_expr_in_synpred19_ANML3963);
        expr();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_rLimit_in_synpred19_ANML3965);
        rLimit();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred19_ANML

    // $ANTLR start synpred20_ANML
    public final void synpred20_ANML_fragment() throws RecognitionException {   
        // ANML.g:659:4: ( lLimit expr ket )
        // ANML.g:659:5: lLimit expr ket
        {
        pushFollow(FOLLOW_lLimit_in_synpred20_ANML3998);
        lLimit();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_expr_in_synpred20_ANML4000);
        expr();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_ket_in_synpred20_ANML4002);
        ket();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred20_ANML

    // $ANTLR start synpred21_ANML
    public final void synpred21_ANML_fragment() throws RecognitionException {   
        // ANML.g:661:6: ( Delta )
        // ANML.g:661:7: Delta
        {
        match(input,Delta,FOLLOW_Delta_in_synpred21_ANML4043); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred21_ANML

    // $ANTLR start synpred22_ANML
    public final void synpred22_ANML_fragment() throws RecognitionException {   
        // ANML.g:662:6: ( Skip )
        // ANML.g:662:7: Skip
        {
        match(input,Skip,FOLLOW_Skip_in_synpred22_ANML4081); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred22_ANML

    // $ANTLR start synpred23_ANML
    public final void synpred23_ANML_fragment() throws RecognitionException {   
        // ANML.g:663:7: ( Delta )
        // ANML.g:663:8: Delta
        {
        match(input,Delta,FOLLOW_Delta_in_synpred23_ANML4097); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred23_ANML

    // $ANTLR start synpred24_ANML
    public final void synpred24_ANML_fragment() throws RecognitionException {   
        // ANML.g:664:5: ( Skip )
        // ANML.g:664:6: Skip
        {
        match(input,Skip,FOLLOW_Skip_in_synpred24_ANML4129); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred24_ANML

    // $ANTLR start synpred25_ANML
    public final void synpred25_ANML_fragment() throws RecognitionException {   
        // ANML.g:690:4: ( e_prefix )
        // ANML.g:690:5: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred25_ANML4343);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred25_ANML

    // $ANTLR start synpred26_ANML
    public final void synpred26_ANML_fragment() throws RecognitionException {   
        // ANML.g:699:4: ( interval expr )
        // ANML.g:699:5: interval expr
        {
        pushFollow(FOLLOW_interval_in_synpred26_ANML4394);
        interval();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_expr_in_synpred26_ANML4396);
        expr();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred26_ANML

    // $ANTLR start synpred27_ANML
    public final void synpred27_ANML_fragment() throws RecognitionException {   
        // ANML.g:703:4: ( Contains )
        // ANML.g:703:5: Contains
        {
        match(input,Contains,FOLLOW_Contains_in_synpred27_ANML4425); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred27_ANML

    // $ANTLR start synpred28_ANML
    public final void synpred28_ANML_fragment() throws RecognitionException {   
        // ANML.g:704:4: ( exist_time expr )
        // ANML.g:704:5: exist_time expr
        {
        pushFollow(FOLLOW_exist_time_in_synpred28_ANML4436);
        exist_time();

        state._fsp--;
        if (state.failed) return ;
        pushFollow(FOLLOW_expr_in_synpred28_ANML4438);
        expr();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred28_ANML

    // $ANTLR start synpred29_ANML
    public final void synpred29_ANML_fragment() throws RecognitionException {   
        // ANML.g:722:13: ( Implies )
        // ANML.g:722:14: Implies
        {
        match(input,Implies,FOLLOW_Implies_in_synpred29_ANML4564); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred29_ANML

    // $ANTLR start synpred30_ANML
    public final void synpred30_ANML_fragment() throws RecognitionException {   
        // ANML.g:722:34: ( e_prefix )
        // ANML.g:722:35: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred30_ANML4572);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred30_ANML

    // $ANTLR start synpred31_ANML
    public final void synpred31_ANML_fragment() throws RecognitionException {   
        // ANML.g:726:13: ( EqualLog )
        // ANML.g:726:14: EqualLog
        {
        match(input,EqualLog,FOLLOW_EqualLog_in_synpred31_ANML4596); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred31_ANML

    // $ANTLR start synpred32_ANML
    public final void synpred32_ANML_fragment() throws RecognitionException {   
        // ANML.g:726:36: ( e_prefix )
        // ANML.g:726:37: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred32_ANML4604);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred32_ANML

    // $ANTLR start synpred33_ANML
    public final void synpred33_ANML_fragment() throws RecognitionException {   
        // ANML.g:730:13: ( XorLog )
        // ANML.g:730:14: XorLog
        {
        match(input,XorLog,FOLLOW_XorLog_in_synpred33_ANML4628); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred33_ANML

    // $ANTLR start synpred34_ANML
    public final void synpred34_ANML_fragment() throws RecognitionException {   
        // ANML.g:730:32: ( e_prefix )
        // ANML.g:730:33: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred34_ANML4636);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred34_ANML

    // $ANTLR start synpred35_ANML
    public final void synpred35_ANML_fragment() throws RecognitionException {   
        // ANML.g:746:13: ( OrLog )
        // ANML.g:746:14: OrLog
        {
        match(input,OrLog,FOLLOW_OrLog_in_synpred35_ANML4673); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred35_ANML

    // $ANTLR start synpred36_ANML
    public final void synpred36_ANML_fragment() throws RecognitionException {   
        // ANML.g:746:30: ( e_prefix )
        // ANML.g:746:31: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred36_ANML4681);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred36_ANML

    // $ANTLR start synpred37_ANML
    public final void synpred37_ANML_fragment() throws RecognitionException {   
        // ANML.g:750:13: ( AndLog )
        // ANML.g:750:14: AndLog
        {
        match(input,AndLog,FOLLOW_AndLog_in_synpred37_ANML4706); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred37_ANML

    // $ANTLR start synpred38_ANML
    public final void synpred38_ANML_fragment() throws RecognitionException {   
        // ANML.g:750:32: ( e_prefix )
        // ANML.g:750:33: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred38_ANML4714);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred38_ANML

    // $ANTLR start synpred39_ANML
    public final void synpred39_ANML_fragment() throws RecognitionException {   
        // ANML.g:754:4: ( NotLog )
        // ANML.g:754:5: NotLog
        {
        match(input,NotLog,FOLLOW_NotLog_in_synpred39_ANML4735); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred39_ANML

    // $ANTLR start synpred40_ANML
    public final void synpred40_ANML_fragment() throws RecognitionException {   
        // ANML.g:754:23: ( e_prefix )
        // ANML.g:754:24: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred40_ANML4743);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred40_ANML

    // $ANTLR start synpred41_ANML
    public final void synpred41_ANML_fragment() throws RecognitionException {   
        // ANML.g:759:13: ( num_relop )
        // ANML.g:759:14: num_relop
        {
        pushFollow(FOLLOW_num_relop_in_synpred41_ANML4770);
        num_relop();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred41_ANML

    // $ANTLR start synpred42_ANML
    public final void synpred42_ANML_fragment() throws RecognitionException {   
        // ANML.g:759:38: ( e_prefix )
        // ANML.g:759:39: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred42_ANML4778);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred42_ANML

    // $ANTLR start synpred43_ANML
    public final void synpred43_ANML_fragment() throws RecognitionException {   
        // ANML.g:763:4: ( e_prefix )
        // ANML.g:763:5: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred43_ANML4799);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred43_ANML

    // $ANTLR start synpred44_ANML
    public final void synpred44_ANML_fragment() throws RecognitionException {   
        // ANML.g:768:13: ( XorBit )
        // ANML.g:768:14: XorBit
        {
        match(input,XorBit,FOLLOW_XorBit_in_synpred44_ANML4821); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred44_ANML

    // $ANTLR start synpred45_ANML
    public final void synpred45_ANML_fragment() throws RecognitionException {   
        // ANML.g:768:32: ( e_prefix )
        // ANML.g:768:33: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred45_ANML4829);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred45_ANML

    // $ANTLR start synpred46_ANML
    public final void synpred46_ANML_fragment() throws RecognitionException {   
        // ANML.g:772:13: ( Plus | Minus | OrBit )
        // ANML.g:
        {
        if ( (input.LA(1)>=Plus && input.LA(1)<=OrBit) ) {
            input.consume();
            state.errorRecovery=false;state.failed=false;
        }
        else {
            if (state.backtracking>0) {state.failed=true; return ;}
            MismatchedSetException mse = new MismatchedSetException(null,input);
            throw mse;
        }


        }
    }
    // $ANTLR end synpred46_ANML

    // $ANTLR start synpred47_ANML
    public final void synpred47_ANML_fragment() throws RecognitionException {   
        // ANML.g:772:56: ( e_prefix )
        // ANML.g:772:57: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred47_ANML4873);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred47_ANML

    // $ANTLR start synpred48_ANML
    public final void synpred48_ANML_fragment() throws RecognitionException {   
        // ANML.g:777:4: ( Times | Divide | AndBit )
        // ANML.g:
        {
        if ( (input.LA(1)>=Times && input.LA(1)<=AndBit) ) {
            input.consume();
            state.errorRecovery=false;state.failed=false;
        }
        else {
            if (state.backtracking>0) {state.failed=true; return ;}
            MismatchedSetException mse = new MismatchedSetException(null,input);
            throw mse;
        }


        }
    }
    // $ANTLR end synpred48_ANML

    // $ANTLR start synpred49_ANML
    public final void synpred49_ANML_fragment() throws RecognitionException {   
        // ANML.g:778:5: ( e_prefix )
        // ANML.g:778:6: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred49_ANML4924);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred49_ANML

    // $ANTLR start synpred50_ANML
    public final void synpred50_ANML_fragment() throws RecognitionException {   
        // ANML.g:785:4: ( Minus | NotBit )
        // ANML.g:
        {
        if ( input.LA(1)==NotBit||input.LA(1)==Minus ) {
            input.consume();
            state.errorRecovery=false;state.failed=false;
        }
        else {
            if (state.backtracking>0) {state.failed=true; return ;}
            MismatchedSetException mse = new MismatchedSetException(null,input);
            throw mse;
        }


        }
    }
    // $ANTLR end synpred50_ANML

    // $ANTLR start synpred51_ANML
    public final void synpred51_ANML_fragment() throws RecognitionException {   
        // ANML.g:786:4: ( e_prefix )
        // ANML.g:786:5: e_prefix
        {
        pushFollow(FOLLOW_e_prefix_in_synpred51_ANML4974);
        e_prefix();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred51_ANML

    // $ANTLR start synpred52_ANML
    public final void synpred52_ANML_fragment() throws RecognitionException {   
        // ANML.g:808:5: ( arg_list )
        // ANML.g:808:6: arg_list
        {
        pushFollow(FOLLOW_arg_list_in_synpred52_ANML5121);
        arg_list();

        state._fsp--;
        if (state.failed) return ;

        }
    }
    // $ANTLR end synpred52_ANML

    // $ANTLR start synpred53_ANML
    public final void synpred53_ANML_fragment() throws RecognitionException {   
        // ANML.g:814:4: ( Bra LeftP ID RightP )
        // ANML.g:814:5: Bra LeftP ID RightP
        {
        match(input,Bra,FOLLOW_Bra_in_synpred53_ANML5156); if (state.failed) return ;
        match(input,LeftP,FOLLOW_LeftP_in_synpred53_ANML5158); if (state.failed) return ;
        match(input,ID,FOLLOW_ID_in_synpred53_ANML5160); if (state.failed) return ;
        match(input,RightP,FOLLOW_RightP_in_synpred53_ANML5162); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred53_ANML

    // $ANTLR start synpred54_ANML
    public final void synpred54_ANML_fragment() throws RecognitionException {   
        // ANML.g:816:4: ( Start LeftP ID RightP )
        // ANML.g:816:5: Start LeftP ID RightP
        {
        match(input,Start,FOLLOW_Start_in_synpred54_ANML5193); if (state.failed) return ;
        match(input,LeftP,FOLLOW_LeftP_in_synpred54_ANML5195); if (state.failed) return ;
        match(input,ID,FOLLOW_ID_in_synpred54_ANML5197); if (state.failed) return ;
        match(input,RightP,FOLLOW_RightP_in_synpred54_ANML5199); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred54_ANML

    // $ANTLR start synpred55_ANML
    public final void synpred55_ANML_fragment() throws RecognitionException {   
        // ANML.g:818:4: ( End LeftP ID RightP )
        // ANML.g:818:5: End LeftP ID RightP
        {
        match(input,End,FOLLOW_End_in_synpred55_ANML5230); if (state.failed) return ;
        match(input,LeftP,FOLLOW_LeftP_in_synpred55_ANML5232); if (state.failed) return ;
        match(input,ID,FOLLOW_ID_in_synpred55_ANML5234); if (state.failed) return ;
        match(input,RightP,FOLLOW_RightP_in_synpred55_ANML5236); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred55_ANML

    // $ANTLR start synpred56_ANML
    public final void synpred56_ANML_fragment() throws RecognitionException {   
        // ANML.g:820:4: ( Duration LeftP ID RightP )
        // ANML.g:820:5: Duration LeftP ID RightP
        {
        match(input,Duration,FOLLOW_Duration_in_synpred56_ANML5264); if (state.failed) return ;
        match(input,LeftP,FOLLOW_LeftP_in_synpred56_ANML5266); if (state.failed) return ;
        match(input,ID,FOLLOW_ID_in_synpred56_ANML5268); if (state.failed) return ;
        match(input,RightP,FOLLOW_RightP_in_synpred56_ANML5270); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred56_ANML

    // $ANTLR start synpred57_ANML
    public final void synpred57_ANML_fragment() throws RecognitionException {   
        // ANML.g:822:4: ( Ket LeftP ID RightP )
        // ANML.g:822:5: Ket LeftP ID RightP
        {
        match(input,Ket,FOLLOW_Ket_in_synpred57_ANML5298); if (state.failed) return ;
        match(input,LeftP,FOLLOW_LeftP_in_synpred57_ANML5300); if (state.failed) return ;
        match(input,ID,FOLLOW_ID_in_synpred57_ANML5302); if (state.failed) return ;
        match(input,RightP,FOLLOW_RightP_in_synpred57_ANML5304); if (state.failed) return ;

        }
    }
    // $ANTLR end synpred57_ANML

    // Delegated rules

    public final boolean synpred19_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred19_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred51_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred51_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred52_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred52_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred10_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred10_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred54_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred54_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred4_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred4_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred5_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred5_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred14_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred14_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred37_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred37_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred26_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred26_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred18_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred18_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred3_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred3_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred28_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred28_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred16_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred16_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred11_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred11_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred31_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred31_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred42_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred42_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred46_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred46_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred56_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred56_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred55_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred55_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred48_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred48_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred22_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred22_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred13_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred13_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred27_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred27_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred38_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred38_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred20_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred20_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred39_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred39_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred49_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred49_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred12_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred12_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred6_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred6_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred30_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred30_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred50_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred50_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred41_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred41_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred44_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred44_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred1_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred1_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred29_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred29_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred43_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred43_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred32_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred32_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred2_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred2_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred15_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred15_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred34_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred34_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred53_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred53_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred36_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred36_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred8_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred8_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred17_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred17_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred9_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred9_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred25_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred25_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred7_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred7_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred57_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred57_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred40_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred40_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred23_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred23_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred47_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred47_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred45_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred45_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred35_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred35_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred21_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred21_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred24_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred24_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }
    public final boolean synpred33_ANML() {
        state.backtracking++;
        int start = input.mark();
        try {
            synpred33_ANML_fragment(); // can never throw exception
        } catch (RecognitionException re) {
            System.err.println("impossible: "+re);
        }
        boolean success = !state.failed;
        input.rewind(start);
        state.backtracking--;
        state.failed=false;
        return success;
    }


    protected DFA1 dfa1 = new DFA1(this);
    protected DFA40 dfa40 = new DFA40(this);
    protected DFA42 dfa42 = new DFA42(this);
    protected DFA44 dfa44 = new DFA44(this);
    protected DFA45 dfa45 = new DFA45(this);
    protected DFA46 dfa46 = new DFA46(this);
    protected DFA47 dfa47 = new DFA47(this);
    protected DFA49 dfa49 = new DFA49(this);
    protected DFA66 dfa66 = new DFA66(this);
    protected DFA88 dfa88 = new DFA88(this);
    protected DFA89 dfa89 = new DFA89(this);
    protected DFA91 dfa91 = new DFA91(this);
    protected DFA93 dfa93 = new DFA93(this);
    protected DFA95 dfa95 = new DFA95(this);
    protected DFA97 dfa97 = new DFA97(this);
    protected DFA99 dfa99 = new DFA99(this);
    protected DFA101 dfa101 = new DFA101(this);
    protected DFA103 dfa103 = new DFA103(this);
    protected DFA105 dfa105 = new DFA105(this);
    protected DFA106 dfa106 = new DFA106(this);
    protected DFA109 dfa109 = new DFA109(this);
    protected DFA112 dfa112 = new DFA112(this);
    protected DFA115 dfa115 = new DFA115(this);
    protected DFA120 dfa120 = new DFA120(this);
    protected DFA121 dfa121 = new DFA121(this);
    static final String DFA1_eotS =
        "\15\uffff";
    static final String DFA1_eofS =
        "\1\1\14\uffff";
    static final String DFA1_minS =
        "\1\23\2\uffff\1\70\5\uffff\2\70\1\uffff\1\70";
    static final String DFA1_maxS =
        "\1\176\2\uffff\1\121\5\uffff\1\121\1\166\1\uffff\1\166";
    static final String DFA1_acceptS =
        "\1\uffff\1\10\1\1\1\uffff\1\2\1\3\1\4\1\6\1\7\2\uffff\1\5\1\uffff";
    static final String DFA1_specialS =
        "\15\uffff}>";
    static final String[] DFA1_transitionS = {
            "\1\2\1\5\1\uffff\1\4\2\uffff\1\6\5\uffff\2\10\23\uffff\1\10"+
            "\3\uffff\1\10\10\uffff\1\5\3\uffff\1\10\3\uffff\1\10\1\uffff"+
            "\2\5\1\3\1\10\1\uffff\2\10\2\uffff\1\7\2\10\2\uffff\1\10\1\uffff"+
            "\2\10\10\uffff\1\10\1\uffff\1\10\7\uffff\1\10\4\uffff\2\10\1"+
            "\uffff\10\10",
            "",
            "",
            "\1\12\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\10\uffff\1\11\1"+
            "\uffff\2\13",
            "",
            "",
            "",
            "",
            "",
            "\1\14\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\11\uffff\3\13",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13",
            "",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13"
    };

    static final short[] DFA1_eot = DFA.unpackEncodedString(DFA1_eotS);
    static final short[] DFA1_eof = DFA.unpackEncodedString(DFA1_eofS);
    static final char[] DFA1_min = DFA.unpackEncodedStringToUnsignedChars(DFA1_minS);
    static final char[] DFA1_max = DFA.unpackEncodedStringToUnsignedChars(DFA1_maxS);
    static final short[] DFA1_accept = DFA.unpackEncodedString(DFA1_acceptS);
    static final short[] DFA1_special = DFA.unpackEncodedString(DFA1_specialS);
    static final short[][] DFA1_transition;

    static {
        int numStates = DFA1_transitionS.length;
        DFA1_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA1_transition[i] = DFA.unpackEncodedString(DFA1_transitionS[i]);
        }
    }

    class DFA1 extends DFA {

        public DFA1(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 1;
            this.eot = DFA1_eot;
            this.eof = DFA1_eof;
            this.min = DFA1_min;
            this.max = DFA1_max;
            this.accept = DFA1_accept;
            this.special = DFA1_special;
            this.transition = DFA1_transition;
        }
        public String getDescription() {
            return "()* loopback of 181:2: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*";
        }
    }
    static final String DFA40_eotS =
        "\15\uffff";
    static final String DFA40_eofS =
        "\15\uffff";
    static final String DFA40_minS =
        "\1\23\2\uffff\1\70\5\uffff\2\70\1\uffff\1\70";
    static final String DFA40_maxS =
        "\1\176\2\uffff\1\121\5\uffff\1\121\1\166\1\uffff\1\166";
    static final String DFA40_acceptS =
        "\1\uffff\1\10\1\1\1\uffff\1\2\1\3\1\4\1\6\1\7\2\uffff\1\5\1\uffff";
    static final String DFA40_specialS =
        "\15\uffff}>";
    static final String[] DFA40_transitionS = {
            "\1\2\1\5\1\uffff\1\4\2\uffff\1\6\5\uffff\2\10\23\uffff\1\10"+
            "\3\uffff\1\10\10\uffff\1\5\3\uffff\1\10\3\uffff\1\10\1\uffff"+
            "\2\5\1\3\1\10\1\1\2\10\2\uffff\1\7\2\10\2\uffff\1\10\1\uffff"+
            "\2\10\10\uffff\1\10\1\uffff\1\10\7\uffff\1\10\4\uffff\2\10\1"+
            "\uffff\10\10",
            "",
            "",
            "\1\12\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\10\uffff\1\11\1"+
            "\uffff\2\13",
            "",
            "",
            "",
            "",
            "",
            "\1\14\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\11\uffff\3\13",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13",
            "",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13"
    };

    static final short[] DFA40_eot = DFA.unpackEncodedString(DFA40_eotS);
    static final short[] DFA40_eof = DFA.unpackEncodedString(DFA40_eofS);
    static final char[] DFA40_min = DFA.unpackEncodedStringToUnsignedChars(DFA40_minS);
    static final char[] DFA40_max = DFA.unpackEncodedStringToUnsignedChars(DFA40_maxS);
    static final short[] DFA40_accept = DFA.unpackEncodedString(DFA40_acceptS);
    static final short[] DFA40_special = DFA.unpackEncodedString(DFA40_specialS);
    static final short[][] DFA40_transition;

    static {
        int numStates = DFA40_transitionS.length;
        DFA40_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA40_transition[i] = DFA.unpackEncodedString(DFA40_transitionS[i]);
        }
    }

    class DFA40 extends DFA {

        public DFA40(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 40;
            this.eot = DFA40_eot;
            this.eof = DFA40_eof;
            this.min = DFA40_min;
            this.max = DFA40_max;
            this.accept = DFA40_accept;
            this.special = DFA40_special;
            this.transition = DFA40_transition;
        }
        public String getDescription() {
            return "()+ loopback of 381:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )+";
        }
    }
    static final String DFA42_eotS =
        "\15\uffff";
    static final String DFA42_eofS =
        "\15\uffff";
    static final String DFA42_minS =
        "\1\23\2\uffff\1\70\5\uffff\2\70\1\uffff\1\70";
    static final String DFA42_maxS =
        "\1\176\2\uffff\1\121\5\uffff\1\121\1\166\1\uffff\1\166";
    static final String DFA42_acceptS =
        "\1\uffff\1\10\1\1\1\uffff\1\2\1\3\1\4\1\6\1\7\2\uffff\1\5\1\uffff";
    static final String DFA42_specialS =
        "\15\uffff}>";
    static final String[] DFA42_transitionS = {
            "\1\2\1\5\1\uffff\1\4\2\uffff\1\6\5\uffff\2\10\23\uffff\1\10"+
            "\3\uffff\1\10\10\uffff\1\5\3\uffff\1\10\3\uffff\1\10\1\uffff"+
            "\2\5\1\3\1\10\1\1\2\10\2\uffff\1\7\2\10\1\uffff\1\1\1\10\1\uffff"+
            "\2\10\10\uffff\1\10\1\uffff\1\10\7\uffff\1\10\4\uffff\2\10\1"+
            "\uffff\10\10",
            "",
            "",
            "\1\12\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\10\uffff\1\11\1"+
            "\uffff\2\13",
            "",
            "",
            "",
            "",
            "",
            "\1\14\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\11\uffff\3\13",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13",
            "",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13"
    };

    static final short[] DFA42_eot = DFA.unpackEncodedString(DFA42_eotS);
    static final short[] DFA42_eof = DFA.unpackEncodedString(DFA42_eofS);
    static final char[] DFA42_min = DFA.unpackEncodedStringToUnsignedChars(DFA42_minS);
    static final char[] DFA42_max = DFA.unpackEncodedStringToUnsignedChars(DFA42_maxS);
    static final short[] DFA42_accept = DFA.unpackEncodedString(DFA42_acceptS);
    static final short[] DFA42_special = DFA.unpackEncodedString(DFA42_specialS);
    static final short[][] DFA42_transition;

    static {
        int numStates = DFA42_transitionS.length;
        DFA42_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA42_transition[i] = DFA.unpackEncodedString(DFA42_transitionS[i]);
        }
    }

    class DFA42 extends DFA {

        public DFA42(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 42;
            this.eot = DFA42_eot;
            this.eof = DFA42_eof;
            this.min = DFA42_min;
            this.max = DFA42_max;
            this.accept = DFA42_accept;
            this.special = DFA42_special;
            this.transition = DFA42_transition;
        }
        public String getDescription() {
            return "()* loopback of 456:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*";
        }
    }
    static final String DFA44_eotS =
        "\15\uffff";
    static final String DFA44_eofS =
        "\15\uffff";
    static final String DFA44_minS =
        "\1\23\2\uffff\1\70\5\uffff\2\70\1\uffff\1\70";
    static final String DFA44_maxS =
        "\1\176\2\uffff\1\121\5\uffff\1\121\1\166\1\uffff\1\166";
    static final String DFA44_acceptS =
        "\1\uffff\1\10\1\1\1\uffff\1\2\1\3\1\4\1\6\1\7\2\uffff\1\5\1\uffff";
    static final String DFA44_specialS =
        "\15\uffff}>";
    static final String[] DFA44_transitionS = {
            "\1\2\1\5\1\uffff\1\4\2\uffff\1\6\5\uffff\2\10\23\uffff\1\10"+
            "\3\uffff\1\10\10\uffff\1\5\3\uffff\1\10\3\uffff\1\10\1\uffff"+
            "\2\5\1\3\1\10\1\1\2\10\2\uffff\1\7\2\10\1\uffff\1\1\1\10\1\uffff"+
            "\2\10\10\uffff\1\10\1\uffff\1\10\7\uffff\1\10\4\uffff\2\10\1"+
            "\uffff\10\10",
            "",
            "",
            "\1\12\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\10\uffff\1\11\1"+
            "\uffff\2\13",
            "",
            "",
            "",
            "",
            "",
            "\1\14\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\11\uffff\3\13",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13",
            "",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13"
    };

    static final short[] DFA44_eot = DFA.unpackEncodedString(DFA44_eotS);
    static final short[] DFA44_eof = DFA.unpackEncodedString(DFA44_eofS);
    static final char[] DFA44_min = DFA.unpackEncodedStringToUnsignedChars(DFA44_minS);
    static final char[] DFA44_max = DFA.unpackEncodedStringToUnsignedChars(DFA44_maxS);
    static final short[] DFA44_accept = DFA.unpackEncodedString(DFA44_acceptS);
    static final short[] DFA44_special = DFA.unpackEncodedString(DFA44_specialS);
    static final short[][] DFA44_transition;

    static {
        int numStates = DFA44_transitionS.length;
        DFA44_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA44_transition[i] = DFA.unpackEncodedString(DFA44_transitionS[i]);
        }
    }

    class DFA44 extends DFA {

        public DFA44(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 44;
            this.eot = DFA44_eot;
            this.eof = DFA44_eof;
            this.min = DFA44_min;
            this.max = DFA44_max;
            this.accept = DFA44_accept;
            this.special = DFA44_special;
            this.transition = DFA44_transition;
        }
        public String getDescription() {
            return "()* loopback of 478:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*";
        }
    }
    static final String DFA45_eotS =
        "\15\uffff";
    static final String DFA45_eofS =
        "\15\uffff";
    static final String DFA45_minS =
        "\1\23\2\uffff\1\70\5\uffff\2\70\1\uffff\1\70";
    static final String DFA45_maxS =
        "\1\176\2\uffff\1\121\5\uffff\1\121\1\166\1\uffff\1\166";
    static final String DFA45_acceptS =
        "\1\uffff\1\10\1\1\1\uffff\1\2\1\3\1\4\1\6\1\7\2\uffff\1\5\1\uffff";
    static final String DFA45_specialS =
        "\15\uffff}>";
    static final String[] DFA45_transitionS = {
            "\1\2\1\5\1\uffff\1\4\2\uffff\1\6\5\uffff\2\10\23\uffff\1\10"+
            "\3\uffff\1\10\10\uffff\1\5\3\uffff\1\10\3\uffff\1\10\1\uffff"+
            "\2\5\1\3\1\10\1\1\2\10\2\uffff\1\7\2\10\2\uffff\1\10\1\uffff"+
            "\2\10\10\uffff\1\10\1\uffff\1\10\7\uffff\1\10\4\uffff\2\10\1"+
            "\uffff\10\10",
            "",
            "",
            "\1\12\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\10\uffff\1\11\1"+
            "\uffff\2\13",
            "",
            "",
            "",
            "",
            "",
            "\1\14\4\uffff\1\2\1\uffff\1\2\5\uffff\1\13\11\uffff\3\13",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13",
            "",
            "\1\2\11\uffff\2\2\1\uffff\1\13\3\uffff\1\13\10\uffff\2\13\42"+
            "\uffff\1\13"
    };

    static final short[] DFA45_eot = DFA.unpackEncodedString(DFA45_eotS);
    static final short[] DFA45_eof = DFA.unpackEncodedString(DFA45_eofS);
    static final char[] DFA45_min = DFA.unpackEncodedStringToUnsignedChars(DFA45_minS);
    static final char[] DFA45_max = DFA.unpackEncodedStringToUnsignedChars(DFA45_maxS);
    static final short[] DFA45_accept = DFA.unpackEncodedString(DFA45_acceptS);
    static final short[] DFA45_special = DFA.unpackEncodedString(DFA45_specialS);
    static final short[][] DFA45_transition;

    static {
        int numStates = DFA45_transitionS.length;
        DFA45_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA45_transition[i] = DFA.unpackEncodedString(DFA45_transitionS[i]);
        }
    }

    class DFA45 extends DFA {

        public DFA45(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 45;
            this.eot = DFA45_eot;
            this.eof = DFA45_eof;
            this.min = DFA45_min;
            this.max = DFA45_max;
            this.accept = DFA45_accept;
            this.special = DFA45_special;
            this.transition = DFA45_transition;
        }
        public String getDescription() {
            return "()* loopback of 499:3: (t+= type_decl | c+= const_decl | f+= fluent_decl | a+= action_decl | s+= fact_decl | s+= goal_decl | s+= stmt )*";
        }
    }
    static final String DFA46_eotS =
        "\33\uffff";
    static final String DFA46_eofS =
        "\33\uffff";
    static final String DFA46_minS =
        "\1\37\1\uffff\6\0\23\uffff";
    static final String DFA46_maxS =
        "\1\176\1\uffff\6\0\23\uffff";
    static final String DFA46_acceptS =
        "\1\uffff\1\1\6\uffff\15\1\1\2\1\5\1\3\1\4\1\6\1\7";
    static final String DFA46_specialS =
        "\1\0\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\23\uffff}>";
    static final String[] DFA46_transitionS = {
            "\1\13\1\17\23\uffff\1\26\3\uffff\1\1\14\uffff\1\24\3\uffff\1"+
            "\3\4\uffff\1\25\1\uffff\1\10\1\12\3\uffff\1\2\1\16\2\uffff\1"+
            "\5\1\uffff\1\6\1\7\10\uffff\1\23\1\uffff\1\4\7\uffff\1\11\4"+
            "\uffff\1\20\1\21\1\uffff\1\14\1\15\6\22",
            "",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA46_eot = DFA.unpackEncodedString(DFA46_eotS);
    static final short[] DFA46_eof = DFA.unpackEncodedString(DFA46_eofS);
    static final char[] DFA46_min = DFA.unpackEncodedStringToUnsignedChars(DFA46_minS);
    static final char[] DFA46_max = DFA.unpackEncodedStringToUnsignedChars(DFA46_maxS);
    static final short[] DFA46_accept = DFA.unpackEncodedString(DFA46_acceptS);
    static final short[] DFA46_special = DFA.unpackEncodedString(DFA46_specialS);
    static final short[][] DFA46_transition;

    static {
        int numStates = DFA46_transitionS.length;
        DFA46_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA46_transition[i] = DFA.unpackEncodedString(DFA46_transitionS[i]);
        }
    }

    class DFA46 extends DFA {

        public DFA46(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 46;
            this.eot = DFA46_eot;
            this.eof = DFA46_eof;
            this.min = DFA46_min;
            this.max = DFA46_max;
            this.accept = DFA46_accept;
            this.special = DFA46_special;
            this.transition = DFA46_transition;
        }
        public String getDescription() {
            return "518:1: stmt : ( ( stmt_primitive )=> stmt_primitive | ( stmt_block )=> stmt_block | ( stmt_timed )=> stmt_timed | stmt_contains | stmt_when | stmt_forall | stmt_exists );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA46_0 = input.LA(1);

                         
                        int index46_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA46_0==ID) && (synpred3_ANML())) {s = 1;}

                        else if ( (LA46_0==LeftB) ) {s = 2;}

                        else if ( (LA46_0==LeftP) ) {s = 3;}

                        else if ( (LA46_0==Dots) ) {s = 4;}

                        else if ( (LA46_0==Contains) ) {s = 5;}

                        else if ( (LA46_0==ForAll) ) {s = 6;}

                        else if ( (LA46_0==Exists) ) {s = 7;}

                        else if ( (LA46_0==NotLog) && (synpred3_ANML())) {s = 8;}

                        else if ( (LA46_0==Minus) && (synpred3_ANML())) {s = 9;}

                        else if ( (LA46_0==NotBit) && (synpred3_ANML())) {s = 10;}

                        else if ( (LA46_0==Bra) && (synpred3_ANML())) {s = 11;}

                        else if ( (LA46_0==Start) && (synpred3_ANML())) {s = 12;}

                        else if ( (LA46_0==End) && (synpred3_ANML())) {s = 13;}

                        else if ( (LA46_0==Duration) && (synpred3_ANML())) {s = 14;}

                        else if ( (LA46_0==Ket) && (synpred3_ANML())) {s = 15;}

                        else if ( (LA46_0==Unordered) && (synpred3_ANML())) {s = 16;}

                        else if ( (LA46_0==Ordered) && (synpred3_ANML())) {s = 17;}

                        else if ( ((LA46_0>=INT && LA46_0<=Infinity)) && (synpred3_ANML())) {s = 18;}

                        else if ( (LA46_0==Delta) && (synpred3_ANML())) {s = 19;}

                        else if ( (LA46_0==Semi) && (synpred3_ANML())) {s = 20;}

                        else if ( (LA46_0==LeftC) && (synpred4_ANML())) {s = 21;}

                        else if ( (LA46_0==When) ) {s = 22;}

                         
                        input.seek(index46_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA46_2 = input.LA(1);

                         
                        int index46_2 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (synpred5_ANML()) ) {s = 23;}

                         
                        input.seek(index46_2);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA46_3 = input.LA(1);

                         
                        int index46_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (synpred5_ANML()) ) {s = 23;}

                         
                        input.seek(index46_3);
                        if ( s>=0 ) return s;
                        break;
                    case 3 : 
                        int LA46_4 = input.LA(1);

                         
                        int index46_4 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (synpred5_ANML()) ) {s = 23;}

                         
                        input.seek(index46_4);
                        if ( s>=0 ) return s;
                        break;
                    case 4 : 
                        int LA46_5 = input.LA(1);

                         
                        int index46_5 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (true) ) {s = 24;}

                         
                        input.seek(index46_5);
                        if ( s>=0 ) return s;
                        break;
                    case 5 : 
                        int LA46_6 = input.LA(1);

                         
                        int index46_6 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (true) ) {s = 25;}

                         
                        input.seek(index46_6);
                        if ( s>=0 ) return s;
                        break;
                    case 6 : 
                        int LA46_7 = input.LA(1);

                         
                        int index46_7 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred3_ANML()) ) {s = 20;}

                        else if ( (true) ) {s = 26;}

                         
                        input.seek(index46_7);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 46, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA47_eotS =
        "\30\uffff";
    static final String DFA47_eofS =
        "\30\uffff";
    static final String DFA47_minS =
        "\1\37\3\0\24\uffff";
    static final String DFA47_maxS =
        "\1\176\3\0\24\uffff";
    static final String DFA47_acceptS =
        "\4\uffff\1\2\22\uffff\1\1";
    static final String DFA47_specialS =
        "\1\uffff\1\0\1\1\1\2\24\uffff}>";
    static final String[] DFA47_transitionS = {
            "\2\4\23\uffff\1\4\3\uffff\1\4\14\uffff\1\4\3\uffff\1\2\4\uffff"+
            "\1\4\1\uffff\2\4\3\uffff\1\1\1\4\2\uffff\1\4\1\uffff\2\4\10"+
            "\uffff\1\4\1\uffff\1\3\7\uffff\1\4\4\uffff\2\4\1\uffff\10\4",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA47_eot = DFA.unpackEncodedString(DFA47_eotS);
    static final short[] DFA47_eof = DFA.unpackEncodedString(DFA47_eofS);
    static final char[] DFA47_min = DFA.unpackEncodedStringToUnsignedChars(DFA47_minS);
    static final char[] DFA47_max = DFA.unpackEncodedStringToUnsignedChars(DFA47_maxS);
    static final short[] DFA47_accept = DFA.unpackEncodedString(DFA47_acceptS);
    static final short[] DFA47_special = DFA.unpackEncodedString(DFA47_specialS);
    static final short[][] DFA47_transition;

    static {
        int numStates = DFA47_transitionS.length;
        DFA47_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA47_transition[i] = DFA.unpackEncodedString(DFA47_transitionS[i]);
        }
    }

    class DFA47 extends DFA {

        public DFA47(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 47;
            this.eot = DFA47_eot;
            this.eof = DFA47_eof;
            this.min = DFA47_min;
            this.max = DFA47_max;
            this.accept = DFA47_accept;
            this.special = DFA47_special;
            this.transition = DFA47_transition;
        }
        public String getDescription() {
            return "530:3: ( ( exist_time stmt )=> exist_time stmt -> ^( ContainsSomeStmt[$Contains] exist_time stmt ) | stmt -> ^( ContainsAllStmt[$Contains] stmt ) )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA47_1 = input.LA(1);

                         
                        int index47_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred6_ANML()) ) {s = 23;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index47_1);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA47_2 = input.LA(1);

                         
                        int index47_2 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred6_ANML()) ) {s = 23;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index47_2);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA47_3 = input.LA(1);

                         
                        int index47_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred6_ANML()) ) {s = 23;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index47_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 47, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA49_eotS =
        "\27\uffff";
    static final String DFA49_eofS =
        "\27\uffff";
    static final String DFA49_minS =
        "\1\37\4\0\6\uffff\5\0\7\uffff";
    static final String DFA49_maxS =
        "\1\176\4\0\6\uffff\5\0\7\uffff";
    static final String DFA49_acceptS =
        "\5\uffff\6\1\5\uffff\3\1\1\3\1\5\1\2\1\4";
    static final String DFA49_specialS =
        "\1\0\1\1\1\2\1\3\1\4\6\uffff\1\5\1\6\1\7\1\10\1\11\7\uffff}>";
    static final String[] DFA49_transitionS = {
            "\1\13\1\17\27\uffff\1\1\14\uffff\1\24\3\uffff\1\3\6\uffff\1"+
            "\10\1\12\3\uffff\1\2\1\16\2\uffff\1\5\1\uffff\1\6\1\7\10\uffff"+
            "\1\23\1\uffff\1\4\7\uffff\1\11\4\uffff\1\20\1\21\1\uffff\1\14"+
            "\1\15\6\22",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA49_eot = DFA.unpackEncodedString(DFA49_eotS);
    static final short[] DFA49_eof = DFA.unpackEncodedString(DFA49_eofS);
    static final char[] DFA49_min = DFA.unpackEncodedStringToUnsignedChars(DFA49_minS);
    static final char[] DFA49_max = DFA.unpackEncodedStringToUnsignedChars(DFA49_maxS);
    static final short[] DFA49_accept = DFA.unpackEncodedString(DFA49_acceptS);
    static final short[] DFA49_special = DFA.unpackEncodedString(DFA49_specialS);
    static final short[][] DFA49_transition;

    static {
        int numStates = DFA49_transitionS.length;
        DFA49_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA49_transition[i] = DFA.unpackEncodedString(DFA49_transitionS[i]);
        }
    }

    class DFA49 extends DFA {

        public DFA49(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 49;
            this.eot = DFA49_eot;
            this.eof = DFA49_eof;
            this.min = DFA49_min;
            this.max = DFA49_max;
            this.accept = DFA49_accept;
            this.special = DFA49_special;
            this.transition = DFA49_transition;
        }
        public String getDescription() {
            return "561:1: stmt_primitive : ( ( expr Semi )=> expr Semi | ( stmt_chain Semi )=> stmt_chain Semi | ( stmt_delta_chain Semi )=> stmt_delta_chain Semi | ( stmt_timeless Semi )=> stmt_timeless Semi | Semi -> Skip );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA49_0 = input.LA(1);

                         
                        int index49_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA49_0==ID) ) {s = 1;}

                        else if ( (LA49_0==LeftB) ) {s = 2;}

                        else if ( (LA49_0==LeftP) ) {s = 3;}

                        else if ( (LA49_0==Dots) ) {s = 4;}

                        else if ( (LA49_0==Contains) && (synpred8_ANML())) {s = 5;}

                        else if ( (LA49_0==ForAll) && (synpred8_ANML())) {s = 6;}

                        else if ( (LA49_0==Exists) && (synpred8_ANML())) {s = 7;}

                        else if ( (LA49_0==NotLog) && (synpred8_ANML())) {s = 8;}

                        else if ( (LA49_0==Minus) && (synpred8_ANML())) {s = 9;}

                        else if ( (LA49_0==NotBit) && (synpred8_ANML())) {s = 10;}

                        else if ( (LA49_0==Bra) ) {s = 11;}

                        else if ( (LA49_0==Start) ) {s = 12;}

                        else if ( (LA49_0==End) ) {s = 13;}

                        else if ( (LA49_0==Duration) ) {s = 14;}

                        else if ( (LA49_0==Ket) ) {s = 15;}

                        else if ( (LA49_0==Unordered) && (synpred8_ANML())) {s = 16;}

                        else if ( (LA49_0==Ordered) && (synpred8_ANML())) {s = 17;}

                        else if ( ((LA49_0>=INT && LA49_0<=Infinity)) && (synpred8_ANML())) {s = 18;}

                        else if ( (LA49_0==Delta) && (synpred10_ANML())) {s = 19;}

                        else if ( (LA49_0==Semi) ) {s = 20;}

                         
                        input.seek(index49_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA49_1 = input.LA(1);

                         
                        int index49_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred9_ANML()) ) {s = 21;}

                         
                        input.seek(index49_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA49_2 = input.LA(1);

                         
                        int index49_2 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred9_ANML()) ) {s = 21;}

                        else if ( (synpred10_ANML()) ) {s = 19;}

                         
                        input.seek(index49_2);
                        if ( s>=0 ) return s;
                        break;
                    case 3 : 
                        int LA49_3 = input.LA(1);

                         
                        int index49_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred9_ANML()) ) {s = 21;}

                        else if ( (synpred10_ANML()) ) {s = 19;}

                         
                        input.seek(index49_3);
                        if ( s>=0 ) return s;
                        break;
                    case 4 : 
                        int LA49_4 = input.LA(1);

                         
                        int index49_4 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred9_ANML()) ) {s = 21;}

                        else if ( (synpred10_ANML()) ) {s = 19;}

                         
                        input.seek(index49_4);
                        if ( s>=0 ) return s;
                        break;
                    case 5 : 
                        int LA49_11 = input.LA(1);

                         
                        int index49_11 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred11_ANML()) ) {s = 22;}

                         
                        input.seek(index49_11);
                        if ( s>=0 ) return s;
                        break;
                    case 6 : 
                        int LA49_12 = input.LA(1);

                         
                        int index49_12 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred11_ANML()) ) {s = 22;}

                         
                        input.seek(index49_12);
                        if ( s>=0 ) return s;
                        break;
                    case 7 : 
                        int LA49_13 = input.LA(1);

                         
                        int index49_13 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred11_ANML()) ) {s = 22;}

                         
                        input.seek(index49_13);
                        if ( s>=0 ) return s;
                        break;
                    case 8 : 
                        int LA49_14 = input.LA(1);

                         
                        int index49_14 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred11_ANML()) ) {s = 22;}

                         
                        input.seek(index49_14);
                        if ( s>=0 ) return s;
                        break;
                    case 9 : 
                        int LA49_15 = input.LA(1);

                         
                        int index49_15 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred8_ANML()) ) {s = 18;}

                        else if ( (synpred11_ANML()) ) {s = 22;}

                         
                        input.seek(index49_15);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 49, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA66_eotS =
        "\16\uffff";
    static final String DFA66_eofS =
        "\16\uffff";
    static final String DFA66_minS =
        "\2\102\1\37\6\uffff\1\37\4\uffff";
    static final String DFA66_maxS =
        "\2\u0082\1\176\6\uffff\1\176\4\uffff";
    static final String DFA66_acceptS =
        "\3\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\uffff\1\10\1\11\1\12\1\1";
    static final String DFA66_specialS =
        "\16\uffff}>";
    static final String[] DFA66_transitionS = {
            "\1\12\1\2\2\uffff\1\1\1\uffff\1\14\12\uffff\1\11\11\uffff\1"+
            "\3\1\4\1\5\1\6\1\7\2\10\1\13\32\uffff\4\12",
            "\1\12\1\2\4\uffff\1\14\12\uffff\1\11\11\uffff\1\3\1\4\1\5\1"+
            "\6\1\7\2\10\1\13\32\uffff\4\12",
            "\2\15\27\uffff\1\15\16\uffff\1\14\1\uffff\1\15\7\uffff\1\15"+
            "\3\uffff\2\15\2\uffff\1\15\1\uffff\2\15\12\uffff\1\15\7\uffff"+
            "\1\15\4\uffff\2\15\1\uffff\10\15",
            "",
            "",
            "",
            "",
            "",
            "",
            "\2\12\27\uffff\1\12\20\uffff\1\12\7\uffff\1\12\3\uffff\2\12"+
            "\2\uffff\1\12\1\uffff\2\12\7\uffff\1\13\2\uffff\1\12\7\uffff"+
            "\1\12\4\uffff\2\12\1\uffff\10\12",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA66_eot = DFA.unpackEncodedString(DFA66_eotS);
    static final short[] DFA66_eof = DFA.unpackEncodedString(DFA66_eofS);
    static final char[] DFA66_min = DFA.unpackEncodedStringToUnsignedChars(DFA66_minS);
    static final char[] DFA66_max = DFA.unpackEncodedStringToUnsignedChars(DFA66_maxS);
    static final short[] DFA66_accept = DFA.unpackEncodedString(DFA66_acceptS);
    static final short[] DFA66_special = DFA.unpackEncodedString(DFA66_specialS);
    static final short[][] DFA66_transition;

    static {
        int numStates = DFA66_transitionS.length;
        DFA66_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA66_transition[i] = DFA.unpackEncodedString(DFA66_transitionS[i]);
        }
    }

    class DFA66 extends DFA {

        public DFA66(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 66;
            this.eot = DFA66_eot;
            this.eof = DFA66_eof;
            this.min = DFA66_min;
            this.max = DFA66_max;
            this.accept = DFA66_accept;
            this.special = DFA66_special;
            this.transition = DFA66_transition;
        }
        public String getDescription() {
            return "575:1: stmt_chain_1 : ( ( Comma )? Assign e_num | ( Comma )? o= Change b= e_num -> Undefine ^( Assign $b) | ( Comma )? o= Produce b= e_num | ( Comma )? o= Consume b= e_num | ( Comma )? o= Lend b= e_num -> ^( Produce $b) Skip ^( Consume $b) | ( Comma )? o= Use b= e_num -> ^( Consume $b) Skip ^( Produce $b) | ( Comma )? (o= Within | o= SetAssign ) s= set | ( Comma )? i= num_relop b= e_num | ( Comma )? (o= Equal Skip | o= Skip ) -> Skip | ( Comma )? (o= Assign Undefined | o= Undefine ) -> Undefine );";
        }
    }
    static final String DFA88_eotS =
        "\23\uffff";
    static final String DFA88_eofS =
        "\23\uffff";
    static final String DFA88_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA88_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA88_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA88_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA88_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA88_eot = DFA.unpackEncodedString(DFA88_eotS);
    static final short[] DFA88_eof = DFA.unpackEncodedString(DFA88_eofS);
    static final char[] DFA88_min = DFA.unpackEncodedStringToUnsignedChars(DFA88_minS);
    static final char[] DFA88_max = DFA.unpackEncodedStringToUnsignedChars(DFA88_maxS);
    static final short[] DFA88_accept = DFA.unpackEncodedString(DFA88_acceptS);
    static final short[] DFA88_special = DFA.unpackEncodedString(DFA88_specialS);
    static final short[][] DFA88_transition;

    static {
        int numStates = DFA88_transitionS.length;
        DFA88_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA88_transition[i] = DFA.unpackEncodedString(DFA88_transitionS[i]);
        }
    }

    class DFA88 extends DFA {

        public DFA88(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 88;
            this.eot = DFA88_eot;
            this.eof = DFA88_eof;
            this.min = DFA88_min;
            this.max = DFA88_max;
            this.accept = DFA88_accept;
            this.special = DFA88_special;
            this.transition = DFA88_transition;
        }
        public String getDescription() {
            return "689:1: expr : ( ( e_prefix )=> e_prefix | e_log_1 );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA88_0 = input.LA(1);

                         
                        int index88_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA88_0==ID) ) {s = 1;}

                        else if ( (LA88_0==LeftB) && (synpred25_ANML())) {s = 2;}

                        else if ( (LA88_0==LeftP) ) {s = 3;}

                        else if ( (LA88_0==Dots) && (synpred25_ANML())) {s = 4;}

                        else if ( (LA88_0==Contains) && (synpred25_ANML())) {s = 5;}

                        else if ( (LA88_0==ForAll) && (synpred25_ANML())) {s = 6;}

                        else if ( (LA88_0==Exists) && (synpred25_ANML())) {s = 7;}

                        else if ( ((LA88_0>=Bra && LA88_0<=Ket)||(LA88_0>=NotLog && LA88_0<=NotBit)||LA88_0==Duration||LA88_0==Minus||(LA88_0>=Unordered && LA88_0<=Ordered)||(LA88_0>=Start && LA88_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index88_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA88_1 = input.LA(1);

                         
                        int index88_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred25_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index88_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA88_3 = input.LA(1);

                         
                        int index88_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred25_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index88_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 88, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA89_eotS =
        "\24\uffff";
    static final String DFA89_eofS =
        "\24\uffff";
    static final String DFA89_minS =
        "\1\37\3\0\20\uffff";
    static final String DFA89_maxS =
        "\1\176\3\0\20\uffff";
    static final String DFA89_acceptS =
        "\4\uffff\1\2\16\uffff\1\1";
    static final String DFA89_specialS =
        "\1\uffff\1\0\1\1\1\2\20\uffff}>";
    static final String[] DFA89_transitionS = {
            "\2\4\27\uffff\1\4\20\uffff\1\2\6\uffff\2\4\3\uffff\1\1\1\4\2"+
            "\uffff\1\4\1\uffff\2\4\12\uffff\1\3\7\uffff\1\4\4\uffff\2\4"+
            "\1\uffff\10\4",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA89_eot = DFA.unpackEncodedString(DFA89_eotS);
    static final short[] DFA89_eof = DFA.unpackEncodedString(DFA89_eofS);
    static final char[] DFA89_min = DFA.unpackEncodedStringToUnsignedChars(DFA89_minS);
    static final char[] DFA89_max = DFA.unpackEncodedStringToUnsignedChars(DFA89_maxS);
    static final short[] DFA89_accept = DFA.unpackEncodedString(DFA89_acceptS);
    static final short[] DFA89_special = DFA.unpackEncodedString(DFA89_specialS);
    static final short[][] DFA89_transition;

    static {
        int numStates = DFA89_transitionS.length;
        DFA89_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA89_transition[i] = DFA.unpackEncodedString(DFA89_transitionS[i]);
        }
    }

    class DFA89 extends DFA {

        public DFA89(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 89;
            this.eot = DFA89_eot;
            this.eof = DFA89_eof;
            this.min = DFA89_min;
            this.max = DFA89_max;
            this.accept = DFA89_accept;
            this.special = DFA89_special;
            this.transition = DFA89_transition;
        }
        public String getDescription() {
            return "704:3: ( ( exist_time expr )=> exist_time e= expr -> ^( ContainsSomeExpr[$Contains] exist_time $e) | e= expr -> ^( ContainsAllExpr[$Contains] $e) )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA89_1 = input.LA(1);

                         
                        int index89_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred28_ANML()) ) {s = 19;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index89_1);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA89_2 = input.LA(1);

                         
                        int index89_2 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred28_ANML()) ) {s = 19;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index89_2);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA89_3 = input.LA(1);

                         
                        int index89_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred28_ANML()) ) {s = 19;}

                        else if ( (true) ) {s = 4;}

                         
                        input.seek(index89_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 89, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA91_eotS =
        "\23\uffff";
    static final String DFA91_eofS =
        "\23\uffff";
    static final String DFA91_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA91_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA91_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA91_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA91_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA91_eot = DFA.unpackEncodedString(DFA91_eotS);
    static final short[] DFA91_eof = DFA.unpackEncodedString(DFA91_eofS);
    static final char[] DFA91_min = DFA.unpackEncodedStringToUnsignedChars(DFA91_minS);
    static final char[] DFA91_max = DFA.unpackEncodedStringToUnsignedChars(DFA91_maxS);
    static final short[] DFA91_accept = DFA.unpackEncodedString(DFA91_acceptS);
    static final short[] DFA91_special = DFA.unpackEncodedString(DFA91_specialS);
    static final short[][] DFA91_transition;

    static {
        int numStates = DFA91_transitionS.length;
        DFA91_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA91_transition[i] = DFA.unpackEncodedString(DFA91_transitionS[i]);
        }
    }

    class DFA91 extends DFA {

        public DFA91(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 91;
            this.eot = DFA91_eot;
            this.eof = DFA91_eof;
            this.min = DFA91_min;
            this.max = DFA91_max;
            this.accept = DFA91_accept;
            this.special = DFA91_special;
            this.transition = DFA91_transition;
        }
        public String getDescription() {
            return "722:33: ( ( e_prefix )=> e_prefix | e_log_1 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA91_0 = input.LA(1);

                         
                        int index91_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA91_0==ID) ) {s = 1;}

                        else if ( (LA91_0==LeftB) && (synpred30_ANML())) {s = 2;}

                        else if ( (LA91_0==LeftP) ) {s = 3;}

                        else if ( (LA91_0==Dots) && (synpred30_ANML())) {s = 4;}

                        else if ( (LA91_0==Contains) && (synpred30_ANML())) {s = 5;}

                        else if ( (LA91_0==ForAll) && (synpred30_ANML())) {s = 6;}

                        else if ( (LA91_0==Exists) && (synpred30_ANML())) {s = 7;}

                        else if ( ((LA91_0>=Bra && LA91_0<=Ket)||(LA91_0>=NotLog && LA91_0<=NotBit)||LA91_0==Duration||LA91_0==Minus||(LA91_0>=Unordered && LA91_0<=Ordered)||(LA91_0>=Start && LA91_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index91_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA91_1 = input.LA(1);

                         
                        int index91_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred30_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index91_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA91_3 = input.LA(1);

                         
                        int index91_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred30_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index91_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 91, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA93_eotS =
        "\23\uffff";
    static final String DFA93_eofS =
        "\23\uffff";
    static final String DFA93_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA93_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA93_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA93_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA93_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA93_eot = DFA.unpackEncodedString(DFA93_eotS);
    static final short[] DFA93_eof = DFA.unpackEncodedString(DFA93_eofS);
    static final char[] DFA93_min = DFA.unpackEncodedStringToUnsignedChars(DFA93_minS);
    static final char[] DFA93_max = DFA.unpackEncodedStringToUnsignedChars(DFA93_maxS);
    static final short[] DFA93_accept = DFA.unpackEncodedString(DFA93_acceptS);
    static final short[] DFA93_special = DFA.unpackEncodedString(DFA93_specialS);
    static final short[][] DFA93_transition;

    static {
        int numStates = DFA93_transitionS.length;
        DFA93_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA93_transition[i] = DFA.unpackEncodedString(DFA93_transitionS[i]);
        }
    }

    class DFA93 extends DFA {

        public DFA93(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 93;
            this.eot = DFA93_eot;
            this.eof = DFA93_eof;
            this.min = DFA93_min;
            this.max = DFA93_max;
            this.accept = DFA93_accept;
            this.special = DFA93_special;
            this.transition = DFA93_transition;
        }
        public String getDescription() {
            return "726:35: ( ( e_prefix )=> e_prefix | e_log_3 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA93_0 = input.LA(1);

                         
                        int index93_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA93_0==ID) ) {s = 1;}

                        else if ( (LA93_0==LeftB) && (synpred32_ANML())) {s = 2;}

                        else if ( (LA93_0==LeftP) ) {s = 3;}

                        else if ( (LA93_0==Dots) && (synpred32_ANML())) {s = 4;}

                        else if ( (LA93_0==Contains) && (synpred32_ANML())) {s = 5;}

                        else if ( (LA93_0==ForAll) && (synpred32_ANML())) {s = 6;}

                        else if ( (LA93_0==Exists) && (synpred32_ANML())) {s = 7;}

                        else if ( ((LA93_0>=Bra && LA93_0<=Ket)||(LA93_0>=NotLog && LA93_0<=NotBit)||LA93_0==Duration||LA93_0==Minus||(LA93_0>=Unordered && LA93_0<=Ordered)||(LA93_0>=Start && LA93_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index93_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA93_1 = input.LA(1);

                         
                        int index93_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred32_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index93_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA93_3 = input.LA(1);

                         
                        int index93_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred32_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index93_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 93, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA95_eotS =
        "\23\uffff";
    static final String DFA95_eofS =
        "\23\uffff";
    static final String DFA95_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA95_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA95_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA95_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA95_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA95_eot = DFA.unpackEncodedString(DFA95_eotS);
    static final short[] DFA95_eof = DFA.unpackEncodedString(DFA95_eofS);
    static final char[] DFA95_min = DFA.unpackEncodedStringToUnsignedChars(DFA95_minS);
    static final char[] DFA95_max = DFA.unpackEncodedStringToUnsignedChars(DFA95_maxS);
    static final short[] DFA95_accept = DFA.unpackEncodedString(DFA95_acceptS);
    static final short[] DFA95_special = DFA.unpackEncodedString(DFA95_specialS);
    static final short[][] DFA95_transition;

    static {
        int numStates = DFA95_transitionS.length;
        DFA95_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA95_transition[i] = DFA.unpackEncodedString(DFA95_transitionS[i]);
        }
    }

    class DFA95 extends DFA {

        public DFA95(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 95;
            this.eot = DFA95_eot;
            this.eof = DFA95_eof;
            this.min = DFA95_min;
            this.max = DFA95_max;
            this.accept = DFA95_accept;
            this.special = DFA95_special;
            this.transition = DFA95_transition;
        }
        public String getDescription() {
            return "730:31: ( ( e_prefix )=> e_prefix | e_log_4 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA95_0 = input.LA(1);

                         
                        int index95_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA95_0==ID) ) {s = 1;}

                        else if ( (LA95_0==LeftB) && (synpred34_ANML())) {s = 2;}

                        else if ( (LA95_0==LeftP) ) {s = 3;}

                        else if ( (LA95_0==Dots) && (synpred34_ANML())) {s = 4;}

                        else if ( (LA95_0==Contains) && (synpred34_ANML())) {s = 5;}

                        else if ( (LA95_0==ForAll) && (synpred34_ANML())) {s = 6;}

                        else if ( (LA95_0==Exists) && (synpred34_ANML())) {s = 7;}

                        else if ( ((LA95_0>=Bra && LA95_0<=Ket)||(LA95_0>=NotLog && LA95_0<=NotBit)||LA95_0==Duration||LA95_0==Minus||(LA95_0>=Unordered && LA95_0<=Ordered)||(LA95_0>=Start && LA95_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index95_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA95_1 = input.LA(1);

                         
                        int index95_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred34_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index95_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA95_3 = input.LA(1);

                         
                        int index95_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred34_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index95_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 95, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA97_eotS =
        "\23\uffff";
    static final String DFA97_eofS =
        "\23\uffff";
    static final String DFA97_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA97_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA97_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA97_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA97_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA97_eot = DFA.unpackEncodedString(DFA97_eotS);
    static final short[] DFA97_eof = DFA.unpackEncodedString(DFA97_eofS);
    static final char[] DFA97_min = DFA.unpackEncodedStringToUnsignedChars(DFA97_minS);
    static final char[] DFA97_max = DFA.unpackEncodedStringToUnsignedChars(DFA97_maxS);
    static final short[] DFA97_accept = DFA.unpackEncodedString(DFA97_acceptS);
    static final short[] DFA97_special = DFA.unpackEncodedString(DFA97_specialS);
    static final short[][] DFA97_transition;

    static {
        int numStates = DFA97_transitionS.length;
        DFA97_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA97_transition[i] = DFA.unpackEncodedString(DFA97_transitionS[i]);
        }
    }

    class DFA97 extends DFA {

        public DFA97(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 97;
            this.eot = DFA97_eot;
            this.eof = DFA97_eof;
            this.min = DFA97_min;
            this.max = DFA97_max;
            this.accept = DFA97_accept;
            this.special = DFA97_special;
            this.transition = DFA97_transition;
        }
        public String getDescription() {
            return "746:29: ( ( e_prefix )=> e_prefix | e_log_5 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA97_0 = input.LA(1);

                         
                        int index97_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA97_0==ID) ) {s = 1;}

                        else if ( (LA97_0==LeftB) && (synpred36_ANML())) {s = 2;}

                        else if ( (LA97_0==LeftP) ) {s = 3;}

                        else if ( (LA97_0==Dots) && (synpred36_ANML())) {s = 4;}

                        else if ( (LA97_0==Contains) && (synpred36_ANML())) {s = 5;}

                        else if ( (LA97_0==ForAll) && (synpred36_ANML())) {s = 6;}

                        else if ( (LA97_0==Exists) && (synpred36_ANML())) {s = 7;}

                        else if ( ((LA97_0>=Bra && LA97_0<=Ket)||(LA97_0>=NotLog && LA97_0<=NotBit)||LA97_0==Duration||LA97_0==Minus||(LA97_0>=Unordered && LA97_0<=Ordered)||(LA97_0>=Start && LA97_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index97_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA97_1 = input.LA(1);

                         
                        int index97_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred36_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index97_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA97_3 = input.LA(1);

                         
                        int index97_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred36_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index97_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 97, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA99_eotS =
        "\23\uffff";
    static final String DFA99_eofS =
        "\23\uffff";
    static final String DFA99_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA99_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA99_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA99_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA99_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA99_eot = DFA.unpackEncodedString(DFA99_eotS);
    static final short[] DFA99_eof = DFA.unpackEncodedString(DFA99_eofS);
    static final char[] DFA99_min = DFA.unpackEncodedStringToUnsignedChars(DFA99_minS);
    static final char[] DFA99_max = DFA.unpackEncodedStringToUnsignedChars(DFA99_maxS);
    static final short[] DFA99_accept = DFA.unpackEncodedString(DFA99_acceptS);
    static final short[] DFA99_special = DFA.unpackEncodedString(DFA99_specialS);
    static final short[][] DFA99_transition;

    static {
        int numStates = DFA99_transitionS.length;
        DFA99_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA99_transition[i] = DFA.unpackEncodedString(DFA99_transitionS[i]);
        }
    }

    class DFA99 extends DFA {

        public DFA99(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 99;
            this.eot = DFA99_eot;
            this.eof = DFA99_eof;
            this.min = DFA99_min;
            this.max = DFA99_max;
            this.accept = DFA99_accept;
            this.special = DFA99_special;
            this.transition = DFA99_transition;
        }
        public String getDescription() {
            return "750:31: ( ( e_prefix )=> e_prefix | e_log_6 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA99_0 = input.LA(1);

                         
                        int index99_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA99_0==ID) ) {s = 1;}

                        else if ( (LA99_0==LeftB) && (synpred38_ANML())) {s = 2;}

                        else if ( (LA99_0==LeftP) ) {s = 3;}

                        else if ( (LA99_0==Dots) && (synpred38_ANML())) {s = 4;}

                        else if ( (LA99_0==Contains) && (synpred38_ANML())) {s = 5;}

                        else if ( (LA99_0==ForAll) && (synpred38_ANML())) {s = 6;}

                        else if ( (LA99_0==Exists) && (synpred38_ANML())) {s = 7;}

                        else if ( ((LA99_0>=Bra && LA99_0<=Ket)||(LA99_0>=NotLog && LA99_0<=NotBit)||LA99_0==Duration||LA99_0==Minus||(LA99_0>=Unordered && LA99_0<=Ordered)||(LA99_0>=Start && LA99_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index99_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA99_1 = input.LA(1);

                         
                        int index99_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred38_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index99_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA99_3 = input.LA(1);

                         
                        int index99_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred38_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index99_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 99, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA101_eotS =
        "\23\uffff";
    static final String DFA101_eofS =
        "\23\uffff";
    static final String DFA101_minS =
        "\1\37\1\0\1\uffff\1\0\17\uffff";
    static final String DFA101_maxS =
        "\1\176\1\0\1\uffff\1\0\17\uffff";
    static final String DFA101_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\12\uffff";
    static final String DFA101_specialS =
        "\1\0\1\1\1\uffff\1\2\17\uffff}>";
    static final String[] DFA101_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\6\uffff\2\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA101_eot = DFA.unpackEncodedString(DFA101_eotS);
    static final short[] DFA101_eof = DFA.unpackEncodedString(DFA101_eofS);
    static final char[] DFA101_min = DFA.unpackEncodedStringToUnsignedChars(DFA101_minS);
    static final char[] DFA101_max = DFA.unpackEncodedStringToUnsignedChars(DFA101_maxS);
    static final short[] DFA101_accept = DFA.unpackEncodedString(DFA101_acceptS);
    static final short[] DFA101_special = DFA.unpackEncodedString(DFA101_specialS);
    static final short[][] DFA101_transition;

    static {
        int numStates = DFA101_transitionS.length;
        DFA101_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA101_transition[i] = DFA.unpackEncodedString(DFA101_transitionS[i]);
        }
    }

    class DFA101 extends DFA {

        public DFA101(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 101;
            this.eot = DFA101_eot;
            this.eof = DFA101_eof;
            this.min = DFA101_min;
            this.max = DFA101_max;
            this.accept = DFA101_accept;
            this.special = DFA101_special;
            this.transition = DFA101_transition;
        }
        public String getDescription() {
            return "754:22: ( ( e_prefix )=> e_prefix | e_log_6 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA101_0 = input.LA(1);

                         
                        int index101_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA101_0==ID) ) {s = 1;}

                        else if ( (LA101_0==LeftB) && (synpred40_ANML())) {s = 2;}

                        else if ( (LA101_0==LeftP) ) {s = 3;}

                        else if ( (LA101_0==Dots) && (synpred40_ANML())) {s = 4;}

                        else if ( (LA101_0==Contains) && (synpred40_ANML())) {s = 5;}

                        else if ( (LA101_0==ForAll) && (synpred40_ANML())) {s = 6;}

                        else if ( (LA101_0==Exists) && (synpred40_ANML())) {s = 7;}

                        else if ( ((LA101_0>=Bra && LA101_0<=Ket)||(LA101_0>=NotLog && LA101_0<=NotBit)||LA101_0==Duration||LA101_0==Minus||(LA101_0>=Unordered && LA101_0<=Ordered)||(LA101_0>=Start && LA101_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index101_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA101_1 = input.LA(1);

                         
                        int index101_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred40_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index101_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA101_3 = input.LA(1);

                         
                        int index101_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred40_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index101_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 101, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA103_eotS =
        "\22\uffff";
    static final String DFA103_eofS =
        "\22\uffff";
    static final String DFA103_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA103_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA103_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA103_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA103_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA103_eot = DFA.unpackEncodedString(DFA103_eotS);
    static final short[] DFA103_eof = DFA.unpackEncodedString(DFA103_eofS);
    static final char[] DFA103_min = DFA.unpackEncodedStringToUnsignedChars(DFA103_minS);
    static final char[] DFA103_max = DFA.unpackEncodedStringToUnsignedChars(DFA103_maxS);
    static final short[] DFA103_accept = DFA.unpackEncodedString(DFA103_acceptS);
    static final short[] DFA103_special = DFA.unpackEncodedString(DFA103_specialS);
    static final short[][] DFA103_transition;

    static {
        int numStates = DFA103_transitionS.length;
        DFA103_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA103_transition[i] = DFA.unpackEncodedString(DFA103_transitionS[i]);
        }
    }

    class DFA103 extends DFA {

        public DFA103(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 103;
            this.eot = DFA103_eot;
            this.eof = DFA103_eof;
            this.min = DFA103_min;
            this.max = DFA103_max;
            this.accept = DFA103_accept;
            this.special = DFA103_special;
            this.transition = DFA103_transition;
        }
        public String getDescription() {
            return "759:37: ( ( e_prefix )=> e_prefix | e_num_1 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA103_0 = input.LA(1);

                         
                        int index103_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA103_0==ID) ) {s = 1;}

                        else if ( (LA103_0==LeftB) && (synpred42_ANML())) {s = 2;}

                        else if ( (LA103_0==LeftP) ) {s = 3;}

                        else if ( (LA103_0==Dots) && (synpred42_ANML())) {s = 4;}

                        else if ( (LA103_0==Contains) && (synpred42_ANML())) {s = 5;}

                        else if ( (LA103_0==ForAll) && (synpred42_ANML())) {s = 6;}

                        else if ( (LA103_0==Exists) && (synpred42_ANML())) {s = 7;}

                        else if ( ((LA103_0>=Bra && LA103_0<=Ket)||LA103_0==NotBit||LA103_0==Duration||LA103_0==Minus||(LA103_0>=Unordered && LA103_0<=Ordered)||(LA103_0>=Start && LA103_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index103_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA103_1 = input.LA(1);

                         
                        int index103_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred42_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index103_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA103_3 = input.LA(1);

                         
                        int index103_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred42_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index103_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 103, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA105_eotS =
        "\22\uffff";
    static final String DFA105_eofS =
        "\22\uffff";
    static final String DFA105_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA105_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA105_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA105_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA105_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA105_eot = DFA.unpackEncodedString(DFA105_eotS);
    static final short[] DFA105_eof = DFA.unpackEncodedString(DFA105_eofS);
    static final char[] DFA105_min = DFA.unpackEncodedStringToUnsignedChars(DFA105_minS);
    static final char[] DFA105_max = DFA.unpackEncodedStringToUnsignedChars(DFA105_maxS);
    static final short[] DFA105_accept = DFA.unpackEncodedString(DFA105_acceptS);
    static final short[] DFA105_special = DFA.unpackEncodedString(DFA105_specialS);
    static final short[][] DFA105_transition;

    static {
        int numStates = DFA105_transitionS.length;
        DFA105_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA105_transition[i] = DFA.unpackEncodedString(DFA105_transitionS[i]);
        }
    }

    class DFA105 extends DFA {

        public DFA105(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 105;
            this.eot = DFA105_eot;
            this.eof = DFA105_eof;
            this.min = DFA105_min;
            this.max = DFA105_max;
            this.accept = DFA105_accept;
            this.special = DFA105_special;
            this.transition = DFA105_transition;
        }
        public String getDescription() {
            return "762:1: e_num : ( ( e_prefix )=> e_prefix | e_num_1 );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA105_0 = input.LA(1);

                         
                        int index105_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA105_0==ID) ) {s = 1;}

                        else if ( (LA105_0==LeftB) && (synpred43_ANML())) {s = 2;}

                        else if ( (LA105_0==LeftP) ) {s = 3;}

                        else if ( (LA105_0==Dots) && (synpred43_ANML())) {s = 4;}

                        else if ( (LA105_0==Contains) && (synpred43_ANML())) {s = 5;}

                        else if ( (LA105_0==ForAll) && (synpred43_ANML())) {s = 6;}

                        else if ( (LA105_0==Exists) && (synpred43_ANML())) {s = 7;}

                        else if ( ((LA105_0>=Bra && LA105_0<=Ket)||LA105_0==NotBit||LA105_0==Duration||LA105_0==Minus||(LA105_0>=Unordered && LA105_0<=Ordered)||(LA105_0>=Start && LA105_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index105_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA105_1 = input.LA(1);

                         
                        int index105_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred43_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index105_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA105_3 = input.LA(1);

                         
                        int index105_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred43_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index105_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 105, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA106_eotS =
        "\22\uffff";
    static final String DFA106_eofS =
        "\22\uffff";
    static final String DFA106_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA106_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA106_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA106_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA106_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA106_eot = DFA.unpackEncodedString(DFA106_eotS);
    static final short[] DFA106_eof = DFA.unpackEncodedString(DFA106_eofS);
    static final char[] DFA106_min = DFA.unpackEncodedStringToUnsignedChars(DFA106_minS);
    static final char[] DFA106_max = DFA.unpackEncodedStringToUnsignedChars(DFA106_maxS);
    static final short[] DFA106_accept = DFA.unpackEncodedString(DFA106_acceptS);
    static final short[] DFA106_special = DFA.unpackEncodedString(DFA106_specialS);
    static final short[][] DFA106_transition;

    static {
        int numStates = DFA106_transitionS.length;
        DFA106_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA106_transition[i] = DFA.unpackEncodedString(DFA106_transitionS[i]);
        }
    }

    class DFA106 extends DFA {

        public DFA106(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 106;
            this.eot = DFA106_eot;
            this.eof = DFA106_eof;
            this.min = DFA106_min;
            this.max = DFA106_max;
            this.accept = DFA106_accept;
            this.special = DFA106_special;
            this.transition = DFA106_transition;
        }
        public String getDescription() {
            return "768:31: ( ( e_prefix )=> e_prefix | e_num_2 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA106_0 = input.LA(1);

                         
                        int index106_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA106_0==ID) ) {s = 1;}

                        else if ( (LA106_0==LeftB) && (synpred45_ANML())) {s = 2;}

                        else if ( (LA106_0==LeftP) ) {s = 3;}

                        else if ( (LA106_0==Dots) && (synpred45_ANML())) {s = 4;}

                        else if ( (LA106_0==Contains) && (synpred45_ANML())) {s = 5;}

                        else if ( (LA106_0==ForAll) && (synpred45_ANML())) {s = 6;}

                        else if ( (LA106_0==Exists) && (synpred45_ANML())) {s = 7;}

                        else if ( ((LA106_0>=Bra && LA106_0<=Ket)||LA106_0==NotBit||LA106_0==Duration||LA106_0==Minus||(LA106_0>=Unordered && LA106_0<=Ordered)||(LA106_0>=Start && LA106_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index106_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA106_1 = input.LA(1);

                         
                        int index106_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred45_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index106_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA106_3 = input.LA(1);

                         
                        int index106_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred45_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index106_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 106, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA109_eotS =
        "\22\uffff";
    static final String DFA109_eofS =
        "\22\uffff";
    static final String DFA109_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA109_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA109_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA109_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA109_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA109_eot = DFA.unpackEncodedString(DFA109_eotS);
    static final short[] DFA109_eof = DFA.unpackEncodedString(DFA109_eofS);
    static final char[] DFA109_min = DFA.unpackEncodedStringToUnsignedChars(DFA109_minS);
    static final char[] DFA109_max = DFA.unpackEncodedStringToUnsignedChars(DFA109_maxS);
    static final short[] DFA109_accept = DFA.unpackEncodedString(DFA109_acceptS);
    static final short[] DFA109_special = DFA.unpackEncodedString(DFA109_specialS);
    static final short[][] DFA109_transition;

    static {
        int numStates = DFA109_transitionS.length;
        DFA109_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA109_transition[i] = DFA.unpackEncodedString(DFA109_transitionS[i]);
        }
    }

    class DFA109 extends DFA {

        public DFA109(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 109;
            this.eot = DFA109_eot;
            this.eof = DFA109_eof;
            this.min = DFA109_min;
            this.max = DFA109_max;
            this.accept = DFA109_accept;
            this.special = DFA109_special;
            this.transition = DFA109_transition;
        }
        public String getDescription() {
            return "772:55: ( ( e_prefix )=> e_prefix | e_num_3 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA109_0 = input.LA(1);

                         
                        int index109_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA109_0==ID) ) {s = 1;}

                        else if ( (LA109_0==LeftB) && (synpred47_ANML())) {s = 2;}

                        else if ( (LA109_0==LeftP) ) {s = 3;}

                        else if ( (LA109_0==Dots) && (synpred47_ANML())) {s = 4;}

                        else if ( (LA109_0==Contains) && (synpred47_ANML())) {s = 5;}

                        else if ( (LA109_0==ForAll) && (synpred47_ANML())) {s = 6;}

                        else if ( (LA109_0==Exists) && (synpred47_ANML())) {s = 7;}

                        else if ( ((LA109_0>=Bra && LA109_0<=Ket)||LA109_0==NotBit||LA109_0==Duration||LA109_0==Minus||(LA109_0>=Unordered && LA109_0<=Ordered)||(LA109_0>=Start && LA109_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index109_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA109_1 = input.LA(1);

                         
                        int index109_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred47_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index109_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA109_3 = input.LA(1);

                         
                        int index109_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred47_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index109_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 109, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA112_eotS =
        "\22\uffff";
    static final String DFA112_eofS =
        "\22\uffff";
    static final String DFA112_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA112_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA112_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA112_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA112_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA112_eot = DFA.unpackEncodedString(DFA112_eotS);
    static final short[] DFA112_eof = DFA.unpackEncodedString(DFA112_eofS);
    static final char[] DFA112_min = DFA.unpackEncodedStringToUnsignedChars(DFA112_minS);
    static final char[] DFA112_max = DFA.unpackEncodedStringToUnsignedChars(DFA112_maxS);
    static final short[] DFA112_accept = DFA.unpackEncodedString(DFA112_acceptS);
    static final short[] DFA112_special = DFA.unpackEncodedString(DFA112_specialS);
    static final short[][] DFA112_transition;

    static {
        int numStates = DFA112_transitionS.length;
        DFA112_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA112_transition[i] = DFA.unpackEncodedString(DFA112_transitionS[i]);
        }
    }

    class DFA112 extends DFA {

        public DFA112(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 112;
            this.eot = DFA112_eot;
            this.eof = DFA112_eof;
            this.min = DFA112_min;
            this.max = DFA112_max;
            this.accept = DFA112_accept;
            this.special = DFA112_special;
            this.transition = DFA112_transition;
        }
        public String getDescription() {
            return "778:4: ( ( e_prefix )=> e_prefix | e_num_4 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA112_0 = input.LA(1);

                         
                        int index112_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA112_0==ID) ) {s = 1;}

                        else if ( (LA112_0==LeftB) && (synpred49_ANML())) {s = 2;}

                        else if ( (LA112_0==LeftP) ) {s = 3;}

                        else if ( (LA112_0==Dots) && (synpred49_ANML())) {s = 4;}

                        else if ( (LA112_0==Contains) && (synpred49_ANML())) {s = 5;}

                        else if ( (LA112_0==ForAll) && (synpred49_ANML())) {s = 6;}

                        else if ( (LA112_0==Exists) && (synpred49_ANML())) {s = 7;}

                        else if ( ((LA112_0>=Bra && LA112_0<=Ket)||LA112_0==NotBit||LA112_0==Duration||LA112_0==Minus||(LA112_0>=Unordered && LA112_0<=Ordered)||(LA112_0>=Start && LA112_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index112_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA112_1 = input.LA(1);

                         
                        int index112_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred49_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index112_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA112_3 = input.LA(1);

                         
                        int index112_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred49_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index112_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 112, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA115_eotS =
        "\22\uffff";
    static final String DFA115_eofS =
        "\22\uffff";
    static final String DFA115_minS =
        "\1\37\1\0\1\uffff\1\0\16\uffff";
    static final String DFA115_maxS =
        "\1\176\1\0\1\uffff\1\0\16\uffff";
    static final String DFA115_acceptS =
        "\2\uffff\1\1\1\uffff\4\1\1\2\11\uffff";
    static final String DFA115_specialS =
        "\1\0\1\1\1\uffff\1\2\16\uffff}>";
    static final String[] DFA115_transitionS = {
            "\2\10\27\uffff\1\1\20\uffff\1\3\7\uffff\1\10\3\uffff\1\2\1\10"+
            "\2\uffff\1\5\1\uffff\1\6\1\7\12\uffff\1\4\7\uffff\1\10\4\uffff"+
            "\2\10\1\uffff\10\10",
            "\1\uffff",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA115_eot = DFA.unpackEncodedString(DFA115_eotS);
    static final short[] DFA115_eof = DFA.unpackEncodedString(DFA115_eofS);
    static final char[] DFA115_min = DFA.unpackEncodedStringToUnsignedChars(DFA115_minS);
    static final char[] DFA115_max = DFA.unpackEncodedStringToUnsignedChars(DFA115_maxS);
    static final short[] DFA115_accept = DFA.unpackEncodedString(DFA115_acceptS);
    static final short[] DFA115_special = DFA.unpackEncodedString(DFA115_specialS);
    static final short[][] DFA115_transition;

    static {
        int numStates = DFA115_transitionS.length;
        DFA115_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA115_transition[i] = DFA.unpackEncodedString(DFA115_transitionS[i]);
        }
    }

    class DFA115 extends DFA {

        public DFA115(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 115;
            this.eot = DFA115_eot;
            this.eof = DFA115_eof;
            this.min = DFA115_min;
            this.max = DFA115_max;
            this.accept = DFA115_accept;
            this.special = DFA115_special;
            this.transition = DFA115_transition;
        }
        public String getDescription() {
            return "786:3: ( ( e_prefix )=> e_prefix | e_num_4 )";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA115_0 = input.LA(1);

                         
                        int index115_0 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (LA115_0==ID) ) {s = 1;}

                        else if ( (LA115_0==LeftB) && (synpred51_ANML())) {s = 2;}

                        else if ( (LA115_0==LeftP) ) {s = 3;}

                        else if ( (LA115_0==Dots) && (synpred51_ANML())) {s = 4;}

                        else if ( (LA115_0==Contains) && (synpred51_ANML())) {s = 5;}

                        else if ( (LA115_0==ForAll) && (synpred51_ANML())) {s = 6;}

                        else if ( (LA115_0==Exists) && (synpred51_ANML())) {s = 7;}

                        else if ( ((LA115_0>=Bra && LA115_0<=Ket)||LA115_0==NotBit||LA115_0==Duration||LA115_0==Minus||(LA115_0>=Unordered && LA115_0<=Ordered)||(LA115_0>=Start && LA115_0<=Infinity)) ) {s = 8;}

                         
                        input.seek(index115_0);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA115_1 = input.LA(1);

                         
                        int index115_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred51_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index115_1);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA115_3 = input.LA(1);

                         
                        int index115_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred51_ANML()) ) {s = 7;}

                        else if ( (true) ) {s = 8;}

                         
                        input.seek(index115_3);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 115, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA120_eotS =
        "\65\uffff";
    static final String DFA120_eofS =
        "\1\1\64\uffff";
    static final String DFA120_minS =
        "\1\37\36\uffff\1\0\25\uffff";
    static final String DFA120_maxS =
        "\1\u0082\36\uffff\1\0\25\uffff";
    static final String DFA120_acceptS =
        "\1\uffff\1\3\61\uffff\1\1\1\2";
    static final String DFA120_specialS =
        "\37\uffff\1\0\25\uffff}>";
    static final String[] DFA120_transitionS = {
            "\2\1\23\uffff\1\1\3\uffff\1\1\11\uffff\2\1\1\uffff\2\1\1\uffff"+
            "\1\1\1\37\1\1\3\uffff\6\1\1\uffff\3\1\1\uffff\1\1\1\uffff\13"+
            "\1\1\uffff\1\1\1\uffff\15\1\1\63\14\1",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA120_eot = DFA.unpackEncodedString(DFA120_eotS);
    static final short[] DFA120_eof = DFA.unpackEncodedString(DFA120_eofS);
    static final char[] DFA120_min = DFA.unpackEncodedStringToUnsignedChars(DFA120_minS);
    static final char[] DFA120_max = DFA.unpackEncodedStringToUnsignedChars(DFA120_maxS);
    static final short[] DFA120_accept = DFA.unpackEncodedString(DFA120_acceptS);
    static final short[] DFA120_special = DFA.unpackEncodedString(DFA120_specialS);
    static final short[][] DFA120_transition;

    static {
        int numStates = DFA120_transitionS.length;
        DFA120_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA120_transition[i] = DFA.unpackEncodedString(DFA120_transitionS[i]);
        }
    }

    class DFA120 extends DFA {

        public DFA120(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 120;
            this.eot = DFA120_eot;
            this.eof = DFA120_eof;
            this.min = DFA120_min;
            this.max = DFA120_max;
            this.accept = DFA120_accept;
            this.special = DFA120_special;
            this.transition = DFA120_transition;
        }
        public String getDescription() {
            return "()* loopback of 806:3: ( Dot ID -> ^( Access[$Dot,\"AccessField\"] $ref ^( Ref ID ) ) | ( arg_list )=> arg_list -> ^( Bind[$arg_list.tree,\"BindParameters\"] $ref arg_list ) )*";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA120_31 = input.LA(1);

                         
                        int index120_31 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred52_ANML()) ) {s = 52;}

                        else if ( (true) ) {s = 1;}

                         
                        input.seek(index120_31);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 120, _s, input);
            error(nvae);
            throw nvae;
        }
    }
    static final String DFA121_eotS =
        "\20\uffff";
    static final String DFA121_eofS =
        "\20\uffff";
    static final String DFA121_minS =
        "\1\37\5\0\12\uffff";
    static final String DFA121_maxS =
        "\1\170\5\0\12\uffff";
    static final String DFA121_acceptS =
        "\6\uffff\1\1\1\11\1\2\1\6\1\3\1\7\1\4\1\10\1\5\1\12";
    static final String DFA121_specialS =
        "\1\uffff\1\0\1\1\1\2\1\3\1\4\12\uffff}>";
    static final String[] DFA121_transitionS = {
            "\1\1\1\5\65\uffff\1\4\40\uffff\1\2\1\3",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "\1\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA121_eot = DFA.unpackEncodedString(DFA121_eotS);
    static final short[] DFA121_eof = DFA.unpackEncodedString(DFA121_eofS);
    static final char[] DFA121_min = DFA.unpackEncodedStringToUnsignedChars(DFA121_minS);
    static final char[] DFA121_max = DFA.unpackEncodedStringToUnsignedChars(DFA121_maxS);
    static final short[] DFA121_accept = DFA.unpackEncodedString(DFA121_acceptS);
    static final short[] DFA121_special = DFA.unpackEncodedString(DFA121_specialS);
    static final short[][] DFA121_transition;

    static {
        int numStates = DFA121_transitionS.length;
        DFA121_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA121_transition[i] = DFA.unpackEncodedString(DFA121_transitionS[i]);
        }
    }

    class DFA121 extends DFA {

        public DFA121(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 121;
            this.eot = DFA121_eot;
            this.eof = DFA121_eof;
            this.min = DFA121_min;
            this.max = DFA121_max;
            this.accept = DFA121_accept;
            this.special = DFA121_special;
            this.transition = DFA121_transition;
        }
        public String getDescription() {
            return "813:1: time_primitive : ( ( Bra LeftP ID RightP )=> Bra LeftP ID RightP -> ^( LabelRef ID Bra ) | ( Start LeftP ID RightP )=> Start LeftP ID RightP -> ^( LabelRef ID Start ) | ( End LeftP ID RightP )=> End LeftP ID RightP -> ^( LabelRef ID End ) | ( Duration LeftP ID RightP )=> Duration LeftP ID RightP -> ^( LabelRef ID Duration ) | ( Ket LeftP ID RightP )=> Ket LeftP ID RightP -> ^( LabelRef ID Ket ) | Start -> ^( LabelRef This Start ) | End -> ^( LabelRef This End ) | Duration -> ^( LabelRef This Duration ) | Bra -> ^( LabelRef This Bra ) | Ket -> ^( LabelRef This Ket ) );";
        }
        public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
            TokenStream input = (TokenStream)_input;
        	int _s = s;
            switch ( s ) {
                    case 0 : 
                        int LA121_1 = input.LA(1);

                         
                        int index121_1 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred53_ANML()) ) {s = 6;}

                        else if ( (true) ) {s = 7;}

                         
                        input.seek(index121_1);
                        if ( s>=0 ) return s;
                        break;
                    case 1 : 
                        int LA121_2 = input.LA(1);

                         
                        int index121_2 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred54_ANML()) ) {s = 8;}

                        else if ( (true) ) {s = 9;}

                         
                        input.seek(index121_2);
                        if ( s>=0 ) return s;
                        break;
                    case 2 : 
                        int LA121_3 = input.LA(1);

                         
                        int index121_3 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred55_ANML()) ) {s = 10;}

                        else if ( (true) ) {s = 11;}

                         
                        input.seek(index121_3);
                        if ( s>=0 ) return s;
                        break;
                    case 3 : 
                        int LA121_4 = input.LA(1);

                         
                        int index121_4 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred56_ANML()) ) {s = 12;}

                        else if ( (true) ) {s = 13;}

                         
                        input.seek(index121_4);
                        if ( s>=0 ) return s;
                        break;
                    case 4 : 
                        int LA121_5 = input.LA(1);

                         
                        int index121_5 = input.index();
                        input.rewind();
                        s = -1;
                        if ( (synpred57_ANML()) ) {s = 14;}

                        else if ( (true) ) {s = 15;}

                         
                        input.seek(index121_5);
                        if ( s>=0 ) return s;
                        break;
            }
            if (state.backtracking>0) {state.failed=true; return -1;}
            NoViableAltException nvae =
                new NoViableAltException(getDescription(), 121, _s, input);
            error(nvae);
            throw nvae;
        }
    }
 

    public static final BitSet FOLLOW_type_decl_in_model398 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_const_decl_in_model406 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_fluent_decl_in_model414 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_action_decl_in_model422 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_fact_decl_in_model429 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_goal_decl_in_model437 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_model445 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_set_in_builtinType0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_builtinType_in_type_spec567 = new BitSet(new long[]{0x0000000000000002L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_type_spec569 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_type_spec589 = new BitSet(new long[]{0x0000000000000002L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_type_spec591 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Vector_in_type_spec611 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_type_spec613 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_enumeration_in_type_spec629 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_builtinType_in_type_ref644 = new BitSet(new long[]{0x0000000000000002L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_type_ref646 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_type_ref666 = new BitSet(new long[]{0x0000000000000002L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_type_ref668 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_user_type_ref698 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Symbol_in_enumerated_type_ref720 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Object_in_enumerated_type_ref733 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_enumerated_type_ref746 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Predicate_in_predicate_helper768 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_param_helper792 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_var_decl_helper813 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000108L});
    public static final BitSet FOLLOW_init_in_var_decl_helper815 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_fun_decl_helper839 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_fun_decl_helper841 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_const_var_decl_helper863 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000108L});
    public static final BitSet FOLLOW_init_in_const_var_decl_helper865 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_const_fun_decl_helper889 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_const_fun_decl_helper891 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_type_decl_helper914 = new BitSet(new long[]{0x0000000000000002L,0x000000000000001CL});
    public static final BitSet FOLLOW_LessThan_in_type_decl_helper921 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_type_decl_helper925 = new BitSet(new long[]{0x0000000000000002L,0x000000000000001CL});
    public static final BitSet FOLLOW_Assign_in_type_decl_helper932 = new BitSet(new long[]{0xFD00000000000000L,0x0000000000004001L});
    public static final BitSet FOLLOW_type_spec_in_type_decl_helper936 = new BitSet(new long[]{0x0000000000000002L,0x000000000000001CL});
    public static final BitSet FOLLOW_With_in_type_decl_helper943 = new BitSet(new long[]{0x0000000000000000L,0x0000000000004000L});
    public static final BitSet FOLLOW_object_block_in_type_decl_helper947 = new BitSet(new long[]{0x0000000000000002L,0x000000000000001CL});
    public static final BitSet FOLLOW_user_type_ref_in_type_refine_helper998 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_LessThan_in_type_refine_helper1000 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_type_refine_helper1002 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_type_refine_helper1004 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_user_type_ref_in_type_refine_helper1026 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_Assign_in_type_refine_helper1028 = new BitSet(new long[]{0xFD00000000000000L,0x0000000000004001L});
    public static final BitSet FOLLOW_type_spec_in_type_refine_helper1030 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_type_refine_helper1032 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_enumerated_type_ref_in_type_refine_helper1054 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_type_refine_helper1058 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_type_refine_helper1061 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_type_refine_helper1063 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_type_refine_helper1067 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Assign_in_init1094 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_init1097 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Assign_in_init1102 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
    public static final BitSet FOLLOW_Undefined_in_init1105 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Undefine_in_init1111 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftP_in_param_list1124 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_param_in_param_list1128 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000440L});
    public static final BitSet FOLLOW_Comma_in_param_list1131 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_param_in_param_list1135 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000440L});
    public static final BitSet FOLLOW_RightP_in_param_list1139 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftP_in_param_list1157 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_param_list1159 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_ref_in_param1189 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_param_helper_in_param1191 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_param1194 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_param_helper_in_param1196 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000040L});
    public static final BitSet FOLLOW_Type_in_type_decl1223 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_type_decl_helper_in_type_decl1227 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_type_decl1230 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_type_decl_helper_in_type_decl1234 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_type_decl1238 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_refine_in_type_decl1252 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Constant_in_const_decl1269 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_const_decl1271 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_const_var_decl_helper_in_const_decl1278 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_const_decl1281 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_const_var_decl_helper_in_const_decl1285 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_const_decl1289 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_fun_decl_helper_in_const_decl1296 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_const_decl1299 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_const_fun_decl_helper_in_const_decl1303 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_const_decl1307 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Fluent_in_fluent_decl1339 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_fluent_decl1341 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_var_decl_helper_in_fluent_decl1351 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_fluent_decl1354 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_var_decl_helper_in_fluent_decl1358 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_fluent_decl1362 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1372 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_fluent_decl1375 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1379 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_fluent_decl1383 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Variable_in_fluent_decl1394 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_fluent_decl1396 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_var_decl_helper_in_fluent_decl1400 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_fluent_decl1403 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_var_decl_helper_in_fluent_decl1407 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_fluent_decl1411 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Function_in_fluent_decl1417 = new BitSet(new long[]{0xFD00000000000000L});
    public static final BitSet FOLLOW_type_ref_in_fluent_decl1419 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1423 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_fluent_decl1426 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1430 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_fluent_decl1434 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_predicate_helper_in_fluent_decl1440 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1444 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Comma_in_fluent_decl1447 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_fun_decl_helper_in_fluent_decl1451 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000060L});
    public static final BitSet FOLLOW_Semi_in_fluent_decl1455 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Fact_in_type_refine1478 = new BitSet(new long[]{0xA100000000000000L,0x0000000000004000L});
    public static final BitSet FOLLOW_LeftC_in_type_refine1484 = new BitSet(new long[]{0xA100000000000000L,0x0000000000004000L});
    public static final BitSet FOLLOW_type_refine_helper_in_type_refine1486 = new BitSet(new long[]{0xA100000000000000L,0x000000000000C000L});
    public static final BitSet FOLLOW_RightC_in_type_refine1489 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_type_refine_helper_in_type_refine1503 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_fact_decl_helper1534 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_fact_decl_helper1536 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NotLog_in_fact_decl_helper1587 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_NotBit_in_fact_decl_helper1591 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_fact_decl_helper1594 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_fact_decl_helper1596 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_fact_decl_helper1631 = new BitSet(new long[]{0x0000000000000000L,0x00000000000C0000L});
    public static final BitSet FOLLOW_EqualLog_in_fact_decl_helper1636 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_Equal_in_fact_decl_helper1640 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_fact_decl_helper1643 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_fact_decl_helper1645 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Semi_in_fact_decl_helper1680 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_goal_decl_helper1691 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_goal_decl_helper1693 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Semi_in_goal_decl_helper1721 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Fact_in_fact_decl1732 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A634220L});
    public static final BitSet FOLLOW_LeftC_in_fact_decl1740 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A63C220L});
    public static final BitSet FOLLOW_fact_decl_helper_in_fact_decl1742 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A63C220L});
    public static final BitSet FOLLOW_RightC_in_fact_decl1745 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_fact_decl_helper_in_fact_decl1764 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Goal_in_goal_decl1791 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A634220L});
    public static final BitSet FOLLOW_LeftC_in_goal_decl1797 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A63C220L});
    public static final BitSet FOLLOW_goal_decl_helper_in_goal_decl1799 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A63C220L});
    public static final BitSet FOLLOW_RightC_in_goal_decl1802 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_goal_decl_helper_in_goal_decl1815 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftC_in_object_block1846 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_type_decl_in_object_block1854 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_const_decl_in_object_block1863 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_fluent_decl_in_object_block1872 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_action_decl_in_object_block1881 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_fact_decl_in_object_block1889 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_goal_decl_in_object_block1898 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_stmt_in_object_block1907 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_RightC_in_object_block1917 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Action_in_action_decl2022 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_action_decl2024 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_action_decl2030 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_LeftB_in_action_decl2034 = new BitSet(new long[]{0x0000000000000000L,0x0000000000400000L});
    public static final BitSet FOLLOW_Duration_in_action_decl2036 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_action_decl2038 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_action_block_in_action_decl2044 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_durative_action_block2099 = new BitSet(new long[]{0x0000000000000000L,0x0000000000400000L});
    public static final BitSet FOLLOW_Duration_in_durative_action_block2102 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_durative_action_block2104 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_action_block_h_in_durative_action_block2107 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_action_block_h_in_action_block2130 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftC_in_action_block_h2141 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_type_decl_in_action_block_h2149 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_const_decl_in_action_block_h2158 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_fluent_decl_in_action_block_h2167 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_action_decl_in_action_block_h2176 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_fact_decl_in_action_block_h2184 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_goal_decl_in_action_block_h2193 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_stmt_in_action_block_h2202 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01B73FA22L});
    public static final BitSet FOLLOW_decomp_block_in_action_block_h2214 = new BitSet(new long[]{0x0000000000000000L,0x0000000001008000L});
    public static final BitSet FOLLOW_RightC_in_action_block_h2220 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Decomposition_in_decomp_block2310 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_type_decl_in_decomp_block2320 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_const_decl_in_decomp_block2329 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_fluent_decl_in_decomp_block2338 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_action_decl_in_decomp_block2347 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_fact_decl_in_decomp_block2355 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_goal_decl_in_decomp_block2364 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_decomp_block2373 = new BitSet(new long[]{0x0110000182580002L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_LeftC_in_stmt_block2464 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_type_decl_in_stmt_block2472 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_const_decl_in_stmt_block2481 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_fluent_decl_in_stmt_block2490 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_action_decl_in_stmt_block2499 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_fact_decl_in_stmt_block2507 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_goal_decl_in_stmt_block2516 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_stmt_in_stmt_block2525 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A73FA22L});
    public static final BitSet FOLLOW_RightC_in_stmt_block2537 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_primitive_in_stmt2628 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_block_in_stmt2638 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_timed_in_stmt2648 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_contains_in_stmt2653 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_when_in_stmt2658 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_forall_in_stmt2663 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_exists_in_stmt2668 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Contains_in_stmt_contains2678 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_exist_time_in_stmt_contains2691 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_contains2693 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_in_stmt_contains2713 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_When_in_stmt_when2740 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_guard_in_stmt_when2742 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01E737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_when2744 = new BitSet(new long[]{0x0000000000000002L,0x0000000004000000L});
    public static final BitSet FOLLOW_Else_in_stmt_when2757 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_when2759 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ForAll_in_stmt_forall2807 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_stmt_forall2809 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_forall2811 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Exists_in_stmt_exists2834 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_stmt_exists2836 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_exists2838 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interval_in_stmt_timed2861 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_stmt_timed2863 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_stmt_primitive2899 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_stmt_primitive2901 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_chain_in_stmt_primitive2916 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_stmt_primitive2918 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_delta_chain_in_stmt_primitive2931 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_stmt_primitive2933 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_timeless_in_stmt_primitive2948 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_stmt_primitive2950 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Semi_in_stmt_primitive2958 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_stmt_chain2972 = new BitSet(new long[]{0x0000000000000000L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_stmt_chain_1_in_stmt_chain2976 = new BitSet(new long[]{0x0000000000000002L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_interval_in_stmt_chain3043 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_stmt_chain3045 = new BitSet(new long[]{0x0000000000000000L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_stmt_chain_1_in_stmt_chain3049 = new BitSet(new long[]{0x0000000000000002L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13078 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_Assign_in_stmt_chain_13082 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13085 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13093 = new BitSet(new long[]{0x0000000000000000L,0x0000000020000000L});
    public static final BitSet FOLLOW_Change_in_stmt_chain_13098 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13102 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13133 = new BitSet(new long[]{0x0000000000000000L,0x0000000040000000L});
    public static final BitSet FOLLOW_Produce_in_stmt_chain_13139 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13144 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13152 = new BitSet(new long[]{0x0000000000000000L,0x0000000080000000L});
    public static final BitSet FOLLOW_Consume_in_stmt_chain_13158 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13163 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13171 = new BitSet(new long[]{0x0000000000000000L,0x0000000100000000L});
    public static final BitSet FOLLOW_Lend_in_stmt_chain_13176 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13180 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13223 = new BitSet(new long[]{0x0000000000000000L,0x0000000200000000L});
    public static final BitSet FOLLOW_Use_in_stmt_chain_13228 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13232 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13276 = new BitSet(new long[]{0x0000000000000000L,0x0000000C00000000L});
    public static final BitSet FOLLOW_Within_in_stmt_chain_13283 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_SetAssign_in_stmt_chain_13287 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_stmt_chain_13293 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13301 = new BitSet(new long[]{0x0000000000000000L,0x8000000000080044L,0x0000000000000007L});
    public static final BitSet FOLLOW_num_relop_in_stmt_chain_13307 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_chain_13312 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13318 = new BitSet(new long[]{0x0000000000000000L,0x0000001000080000L});
    public static final BitSet FOLLOW_Equal_in_stmt_chain_13324 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_Skip_in_stmt_chain_13326 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_stmt_chain_13332 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_chain_13347 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000108L});
    public static final BitSet FOLLOW_Assign_in_stmt_chain_13353 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
    public static final BitSet FOLLOW_Undefined_in_stmt_chain_13355 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Undefine_in_stmt_chain_13361 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Delta_in_stmt_delta_chain3383 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_stmt_delta_chain3385 = new BitSet(new long[]{0x0000000000000000L,0x0000001820080148L});
    public static final BitSet FOLLOW_stmt_delta_chain_1_in_stmt_delta_chain3389 = new BitSet(new long[]{0x0000000000000002L,0x0000001820080148L});
    public static final BitSet FOLLOW_interval_in_stmt_delta_chain3461 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_stmt_delta_chain3463 = new BitSet(new long[]{0x0000000000000000L,0x0000001820080148L});
    public static final BitSet FOLLOW_stmt_delta_chain_1_in_stmt_delta_chain3467 = new BitSet(new long[]{0x0000000000000002L,0x0000001820080148L});
    public static final BitSet FOLLOW_Comma_in_stmt_delta_chain_13502 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_Assign_in_stmt_delta_chain_13505 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_delta_chain_13510 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_delta_chain_13518 = new BitSet(new long[]{0x0000000000000000L,0x0000000020000000L});
    public static final BitSet FOLLOW_Change_in_stmt_delta_chain_13523 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_in_stmt_delta_chain_13527 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_delta_chain_13557 = new BitSet(new long[]{0x0000000000000000L,0x0000000800000000L});
    public static final BitSet FOLLOW_SetAssign_in_stmt_delta_chain_13560 = new BitSet(new long[]{0x0000000000000000L,0x0000000000204000L});
    public static final BitSet FOLLOW_set_in_stmt_delta_chain_13565 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_delta_chain_13570 = new BitSet(new long[]{0x0000000000000000L,0x0000001000080000L});
    public static final BitSet FOLLOW_Equal_in_stmt_delta_chain_13576 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_Skip_in_stmt_delta_chain_13578 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_stmt_delta_chain_13584 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Comma_in_stmt_delta_chain_13599 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000108L});
    public static final BitSet FOLLOW_Assign_in_stmt_delta_chain_13605 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000080L});
    public static final BitSet FOLLOW_Undefined_in_stmt_delta_chain_13607 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Undefine_in_stmt_delta_chain_13613 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_time_primitive_in_stmt_timeless3634 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000008L});
    public static final BitSet FOLLOW_Assign_in_stmt_timeless3636 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_stmt_timeless3639 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_guard3652 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_univ_time_in_interval3667 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exist_time_in_interval3676 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_univ_time3702 = new BitSet(new long[]{0x0000000000000000L,0x0000004000000000L});
    public static final BitSet FOLLOW_All_in_univ_time3704 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_univ_time3706 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_univ_time3754 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_univ_time3758 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_univ_time3760 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_univ_time3782 = new BitSet(new long[]{0x0100000180000000L,0x7FB080A01A630200L});
    public static final BitSet FOLLOW_delta_time_in_univ_time3792 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_univ_time3794 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_univ_time3798 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_univ_time3800 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_univ_time3835 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_univ_time3837 = new BitSet(new long[]{0x0100000180000000L,0x7FB080A01A630200L});
    public static final BitSet FOLLOW_delta_time_in_univ_time3846 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_univ_time3848 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_univ_time3884 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_univ_time3886 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_exist_time3945 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_Skip_in_exist_time3947 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_exist_time3949 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_exist_time3969 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_exist_time3973 = new BitSet(new long[]{0x0000000000000000L,0x0000008000000000L});
    public static final BitSet FOLLOW_rLimit_in_exist_time3975 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_lLimit_in_exist_time4006 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_exist_time4010 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4012 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_exist_time4034 = new BitSet(new long[]{0x0100000180000000L,0x7FB080B01A630200L});
    public static final BitSet FOLLOW_delta_time_in_exist_time4049 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_exist_time4051 = new BitSet(new long[]{0x0000000000000000L,0x0000001000800400L});
    public static final BitSet FOLLOW_Skip_in_exist_time4053 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4056 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_exist_time4085 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_exist_time4087 = new BitSet(new long[]{0x0100000180000000L,0x7FB080B01A630200L});
    public static final BitSet FOLLOW_delta_time_in_exist_time4103 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4105 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_exist_time4133 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4135 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_exist_time4154 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4156 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_exist_time4186 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
    public static final BitSet FOLLOW_Comma_in_exist_time4188 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_Skip_in_exist_time4190 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_exist_time4192 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Delta_in_delta_time4223 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_num_1_in_delta_time4226 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_bra4238 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftP_in_bra4253 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RightB_in_ket4273 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RightP_in_ket4288 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Dots_in_lLimit4306 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Dots_in_rLimit4322 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_expr4346 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_1_in_expr4351 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_e_prefix4368 = new BitSet(new long[]{0x0000000000000000L,0x0000010000000000L});
    public static final BitSet FOLLOW_Colon_in_e_prefix4370 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_prefix4374 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interval_in_e_prefix4400 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_prefix4404 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Contains_in_e_prefix4429 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_exist_time_in_e_prefix4442 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_prefix4446 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_e_prefix4470 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ForAll_in_e_prefix4494 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_e_prefix4496 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_prefix4500 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Exists_in_e_prefix4519 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_param_list_in_e_prefix4521 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_prefix4525 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_2_in_e_log_14560 = new BitSet(new long[]{0x0000000000000002L,0x0000020000000000L});
    public static final BitSet FOLLOW_Implies_in_e_log_14567 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_14575 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_1_in_e_log_14579 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_3_in_e_log_24592 = new BitSet(new long[]{0x0000000000000002L,0x0000000000040000L});
    public static final BitSet FOLLOW_EqualLog_in_e_log_24599 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_24607 = new BitSet(new long[]{0x0000000000000002L,0x0000000000040000L});
    public static final BitSet FOLLOW_e_log_3_in_e_log_24611 = new BitSet(new long[]{0x0000000000000002L,0x0000000000040000L});
    public static final BitSet FOLLOW_e_log_4_in_e_log_34624 = new BitSet(new long[]{0x0000000000000002L,0x0000040000000000L});
    public static final BitSet FOLLOW_XorLog_in_e_log_34631 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_34639 = new BitSet(new long[]{0x0000000000000002L,0x0000040000000000L});
    public static final BitSet FOLLOW_e_log_4_in_e_log_34643 = new BitSet(new long[]{0x0000000000000002L,0x0000040000000000L});
    public static final BitSet FOLLOW_e_log_5_in_e_log_44669 = new BitSet(new long[]{0x0000000000000002L,0x0000080000000000L});
    public static final BitSet FOLLOW_OrLog_in_e_log_44676 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_44684 = new BitSet(new long[]{0x0000000000000002L,0x0000080000000000L});
    public static final BitSet FOLLOW_e_log_5_in_e_log_44688 = new BitSet(new long[]{0x0000000000000002L,0x0000080000000000L});
    public static final BitSet FOLLOW_e_log_6_in_e_log_54702 = new BitSet(new long[]{0x0000000000000002L,0x0000100000000000L});
    public static final BitSet FOLLOW_AndLog_in_e_log_54709 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_54717 = new BitSet(new long[]{0x0000000000000002L,0x0000100000000000L});
    public static final BitSet FOLLOW_e_log_6_in_e_log_54721 = new BitSet(new long[]{0x0000000000000002L,0x0000100000000000L});
    public static final BitSet FOLLOW_NotLog_in_e_log_64738 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_64746 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_6_in_e_log_64750 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_log_7_in_e_log_64756 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_num_1_in_e_log_74766 = new BitSet(new long[]{0x0000000000000002L,0x8000000000080044L,0x0000000000000007L});
    public static final BitSet FOLLOW_num_relop_in_e_log_74773 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_log_74781 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_num_1_in_e_log_74785 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_e_num4802 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_num_1_in_e_num4807 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_num_2_in_e_num_14817 = new BitSet(new long[]{0x0000000000000002L,0x0000200000000000L});
    public static final BitSet FOLLOW_XorBit_in_e_num_14824 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_num_14832 = new BitSet(new long[]{0x0000000000000002L,0x0000200000000000L});
    public static final BitSet FOLLOW_e_num_2_in_e_num_14836 = new BitSet(new long[]{0x0000000000000002L,0x0000200000000000L});
    public static final BitSet FOLLOW_e_num_3_in_e_num_24849 = new BitSet(new long[]{0x0000000000000002L,0x0001C00000000000L});
    public static final BitSet FOLLOW_Plus_in_e_num_24861 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_Minus_in_e_num_24864 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_OrBit_in_e_num_24867 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_num_24876 = new BitSet(new long[]{0x0000000000000002L,0x0001C00000000000L});
    public static final BitSet FOLLOW_e_num_3_in_e_num_24880 = new BitSet(new long[]{0x0000000000000002L,0x0001C00000000000L});
    public static final BitSet FOLLOW_e_num_4_in_e_num_34893 = new BitSet(new long[]{0x0000000000000002L,0x000E000000000000L});
    public static final BitSet FOLLOW_Times_in_e_num_34908 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_Divide_in_e_num_34911 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_AndBit_in_e_num_34914 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_num_34927 = new BitSet(new long[]{0x0000000000000002L,0x000E000000000000L});
    public static final BitSet FOLLOW_e_num_4_in_e_num_34935 = new BitSet(new long[]{0x0000000000000002L,0x000E000000000000L});
    public static final BitSet FOLLOW_Minus_in_e_num_44962 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_NotBit_in_e_num_44965 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_e_prefix_in_e_num_44977 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_num_4_in_e_num_44984 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_atomic_in_e_num_44993 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftP_in_e_atomic5003 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_e_atomic5006 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_e_atomic5008 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_time_primitive_in_e_atomic5014 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_time_complex_in_e_atomic5019 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_literal_in_e_atomic5024 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_e_atomic5029 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Unordered_in_time_complex5042 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_Ordered_in_time_complex5045 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_complex5049 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_time_complex5052 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000440L});
    public static final BitSet FOLLOW_Comma_in_time_complex5055 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_time_complex5058 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000440L});
    public static final BitSet FOLLOW_RightP_in_time_complex5062 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_ref5076 = new BitSet(new long[]{0x0000000000000002L,0x0040000000000200L});
    public static final BitSet FOLLOW_Dot_in_ref5093 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_ref5095 = new BitSet(new long[]{0x0000000000000002L,0x0040000000000200L});
    public static final BitSet FOLLOW_arg_list_in_ref5125 = new BitSet(new long[]{0x0000000000000002L,0x0040000000000200L});
    public static final BitSet FOLLOW_Bra_in_time_primitive5166 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_primitive5168 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_time_primitive5170 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_time_primitive5172 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Start_in_time_primitive5203 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_primitive5205 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_time_primitive5207 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_time_primitive5209 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_End_in_time_primitive5240 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_primitive5242 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_time_primitive5244 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_time_primitive5246 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Duration_in_time_primitive5274 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_primitive5276 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_time_primitive5278 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_time_primitive5280 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Ket_in_time_primitive5308 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_time_primitive5310 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_time_primitive5312 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_time_primitive5314 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Start_in_time_primitive5334 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_End_in_time_primitive5354 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Duration_in_time_primitive5374 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Bra_in_time_primitive5394 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Ket_in_time_primitive5414 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_enumeration_in_set5438 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_range_in_set5442 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftC_in_enumeration5451 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_enumeration5453 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A638240L});
    public static final BitSet FOLLOW_Comma_in_enumeration5456 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_enumeration5459 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A638240L});
    public static final BitSet FOLLOW_RightC_in_enumeration5463 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_range5485 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_range5489 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630240L});
    public static final BitSet FOLLOW_Comma_in_range5491 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_range5496 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_range5498 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftC_in_type_enumeration5522 = new BitSet(new long[]{0x0100000000000000L,0x7E00000000000000L});
    public static final BitSet FOLLOW_type_enumeration_element_in_type_enumeration5524 = new BitSet(new long[]{0x0100000000000000L,0x7E00000000008040L});
    public static final BitSet FOLLOW_Comma_in_type_enumeration5527 = new BitSet(new long[]{0x0100000000000000L,0x7E00000000000000L});
    public static final BitSet FOLLOW_type_enumeration_element_in_type_enumeration5530 = new BitSet(new long[]{0x0100000000000000L,0x7E00000000008040L});
    public static final BitSet FOLLOW_RightC_in_type_enumeration5534 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_type_enumeration_element5559 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_literal_in_type_enumeration_element5563 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftP_in_arg_list5576 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630600L});
    public static final BitSet FOLLOW_expr_in_arg_list5579 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630640L});
    public static final BitSet FOLLOW_Comma_in_arg_list5582 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_arg_list5585 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630640L});
    public static final BitSet FOLLOW_RightP_in_arg_list5591 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_literal0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_num_relop0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ref_in_synpred1_ANML1528 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred1_ANML1530 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_synpred2_ANML1572 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_synpred2_ANML1578 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred2_ANML1580 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_primitive_in_synpred3_ANML2624 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_block_in_synpred4_ANML2634 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_timed_in_synpred5_ANML2644 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exist_time_in_synpred6_ANML2685 = new BitSet(new long[]{0x0110000182580000L,0x7FB080A01A737A22L});
    public static final BitSet FOLLOW_stmt_in_synpred6_ANML2687 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Else_in_synpred7_ANML2753 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_synpred8_ANML2893 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred8_ANML2895 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_chain_in_synpred9_ANML2910 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred9_ANML2912 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_delta_chain_in_synpred10_ANML2925 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred10_ANML2927 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stmt_timeless_in_synpred11_ANML2942 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
    public static final BitSet FOLLOW_Semi_in_synpred11_ANML2944 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interval_in_synpred12_ANML3034 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_synpred12_ANML3036 = new BitSet(new long[]{0x0000000000000000L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_stmt_chain_1_in_synpred12_ANML3038 = new BitSet(new long[]{0x0000000000000002L,0x8000001FE008014CL,0x0000000000000007L});
    public static final BitSet FOLLOW_interval_in_synpred13_ANML3452 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_ref_in_synpred13_ANML3454 = new BitSet(new long[]{0x0000000000000000L,0x0000001820080148L});
    public static final BitSet FOLLOW_stmt_delta_chain_1_in_synpred13_ANML3456 = new BitSet(new long[]{0x0000000000000002L,0x0000001820080148L});
    public static final BitSet FOLLOW_univ_time_in_synpred14_ANML3664 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exist_time_in_synpred15_ANML3673 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_synpred16_ANML3694 = new BitSet(new long[]{0x0000000000000000L,0x0000004000000000L});
    public static final BitSet FOLLOW_All_in_synpred16_ANML3696 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_synpred16_ANML3698 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_synpred17_ANML3746 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_synpred17_ANML3748 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_synpred17_ANML3750 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LeftB_in_synpred18_ANML3937 = new BitSet(new long[]{0x0000000000000000L,0x0000001000000000L});
    public static final BitSet FOLLOW_Skip_in_synpred18_ANML3939 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800000L});
    public static final BitSet FOLLOW_RightB_in_synpred18_ANML3941 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bra_in_synpred19_ANML3961 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_synpred19_ANML3963 = new BitSet(new long[]{0x0000000000000000L,0x0000008000000000L});
    public static final BitSet FOLLOW_rLimit_in_synpred19_ANML3965 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_lLimit_in_synpred20_ANML3998 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_synpred20_ANML4000 = new BitSet(new long[]{0x0000000000000000L,0x0000000000800400L});
    public static final BitSet FOLLOW_ket_in_synpred20_ANML4002 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Delta_in_synpred21_ANML4043 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_synpred22_ANML4081 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Delta_in_synpred23_ANML4097 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Skip_in_synpred24_ANML4129 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred25_ANML4343 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interval_in_synpred26_ANML4394 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_synpred26_ANML4396 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Contains_in_synpred27_ANML4425 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exist_time_in_synpred28_ANML4436 = new BitSet(new long[]{0x0100000180000000L,0x7FB080801A630200L});
    public static final BitSet FOLLOW_expr_in_synpred28_ANML4438 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Implies_in_synpred29_ANML4564 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred30_ANML4572 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_EqualLog_in_synpred31_ANML4596 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred32_ANML4604 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_XorLog_in_synpred33_ANML4628 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred34_ANML4636 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_OrLog_in_synpred35_ANML4673 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred36_ANML4681 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_AndLog_in_synpred37_ANML4706 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred38_ANML4714 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NotLog_in_synpred39_ANML4735 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred40_ANML4743 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_num_relop_in_synpred41_ANML4770 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred42_ANML4778 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred43_ANML4799 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_XorBit_in_synpred44_ANML4821 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred45_ANML4829 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_synpred46_ANML4852 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred47_ANML4873 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_synpred48_ANML4899 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred49_ANML4924 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_synpred50_ANML4955 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_e_prefix_in_synpred51_ANML4974 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_arg_list_in_synpred52_ANML5121 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Bra_in_synpred53_ANML5156 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_synpred53_ANML5158 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_synpred53_ANML5160 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_synpred53_ANML5162 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Start_in_synpred54_ANML5193 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_synpred54_ANML5195 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_synpred54_ANML5197 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_synpred54_ANML5199 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_End_in_synpred55_ANML5230 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_synpred55_ANML5232 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_synpred55_ANML5234 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_synpred55_ANML5236 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Duration_in_synpred56_ANML5264 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_synpred56_ANML5266 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_synpred56_ANML5268 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_synpred56_ANML5270 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Ket_in_synpred57_ANML5298 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000200L});
    public static final BitSet FOLLOW_LeftP_in_synpred57_ANML5300 = new BitSet(new long[]{0x0100000000000000L});
    public static final BitSet FOLLOW_ID_in_synpred57_ANML5302 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000400L});
    public static final BitSet FOLLOW_RightP_in_synpred57_ANML5304 = new BitSet(new long[]{0x0000000000000002L});

}